small tidy of "signal" while loop

This commit is contained in:
Matt Johnston 2021-03-06 23:05:17 +08:00
parent d2bfa6aedc
commit 6c571c54e5

View File

@ -437,13 +437,11 @@ static int sessionsignal(const struct ChanSess *chansess) {
signame = buf_getstring(ses.payload, NULL); signame = buf_getstring(ses.payload, NULL);
i = 0; for (i = 0; signames[i].name != NULL; i++) {
while (signames[i].name != 0) {
if (strcmp(signames[i].name, signame) == 0) { if (strcmp(signames[i].name, signame) == 0) {
sig = signames[i].signal; sig = signames[i].signal;
break; break;
} }
i++;
} }
m_free(signame); m_free(signame);