changeset 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 19b28d2fbe30
children f0cd000f3bca
files svr-chansession.c
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/svr-chansession.c	Sat Mar 06 22:58:57 2021 +0800
+++ b/svr-chansession.c	Sat Mar 06 23:05:17 2021 +0800
@@ -437,13 +437,11 @@
 
 	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);