Mercurial > dropbear
comparison svr-chansession.c @ 1803:837cc354b388
small tidy of "signal" while loop
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sat, 06 Mar 2021 23:05:17 +0800 |
parents | 685b47d8faf7 |
children | f0cd000f3bca |
comparison
equal
deleted
inserted
replaced
1802:19b28d2fbe30 | 1803:837cc354b388 |
---|---|
435 return DROPBEAR_FAILURE; | 435 return DROPBEAR_FAILURE; |
436 } | 436 } |
437 | 437 |
438 signame = buf_getstring(ses.payload, NULL); | 438 signame = buf_getstring(ses.payload, NULL); |
439 | 439 |
440 i = 0; | 440 for (i = 0; signames[i].name != NULL; i++) { |
441 while (signames[i].name != 0) { | |
442 if (strcmp(signames[i].name, signame) == 0) { | 441 if (strcmp(signames[i].name, signame) == 0) { |
443 sig = signames[i].signal; | 442 sig = signames[i].signal; |
444 break; | 443 break; |
445 } | 444 } |
446 i++; | |
447 } | 445 } |
448 | 446 |
449 m_free(signame); | 447 m_free(signame); |
450 | 448 |
451 TRACE(("sessionsignal: pid %d signal %d", (int)chansess->pid, sig)) | 449 TRACE(("sessionsignal: pid %d signal %d", (int)chansess->pid, sig)) |