summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2021-03-06 23:05:17 +0800
committerMatt Johnston <matt@ucc.asn.au>2021-03-06 23:05:17 +0800
commit6c571c54e59dc67d6504045f8d61b199eaea8576 (patch)
treebfd533eddab479a05660f9cdc669b7feb1821adb
parentd2bfa6aedcdf8f8de2f8acf47ff02845d44714b0 (diff)
small tidy of "signal" while loop
-rw-r--r--svr-chansession.c4
1 files changed, 1 insertions, 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);