From 6c571c54e59dc67d6504045f8d61b199eaea8576 Mon Sep 17 00:00:00 2001 From: Matt Johnston Date: Sat, 6 Mar 2021 23:05:17 +0800 Subject: [PATCH] small tidy of "signal" while loop --- svr-chansession.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/svr-chansession.c b/svr-chansession.c index 1fac918..2060141 100644 --- a/svr-chansession.c +++ b/svr-chansession.c @@ -437,13 +437,11 @@ static int sessionsignal(const struct ChanSess *chansess) { signame = buf_getstring(ses.payload, NULL); - i = 0; - while (signames[i].name != 0) { + for (i = 0; signames[i].name != NULL; i++) { if (strcmp(signames[i].name, signame) == 0) { sig = signames[i].signal; break; } - i++; } m_free(signame);