From ff783628268470acc02e52126d6a357691723fba Mon Sep 17 00:00:00 2001 From: C. McEnroe Date: Mon, 30 Mar 2020 19:44:45 -0400 Subject: Replace some declaration; while loops with for loops I should have been using this for getopt loops already but the call here is slightly too long to fit on one line as a for loop. --- handle.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'handle.c') diff --git a/handle.c b/handle.c index a090ca2..84a2927 100644 --- a/handle.c +++ b/handle.c @@ -383,8 +383,7 @@ static void handleNick(struct Message *msg) { set(&self.nick, msg->params[0]); uiRead(); // Update prompt. } - uint id; - while (None != (id = completeID(msg->nick))) { + for (uint id; (id = completeID(msg->nick));) { if (!strcmp(idNames[id], msg->nick)) { set(&idNames[id], msg->params[0]); } @@ -404,8 +403,7 @@ static void handleNick(struct Message *msg) { static void handleQuit(struct Message *msg) { require(msg, true, 0); - uint id; - while (None != (id = completeID(msg->nick))) { + for (uint id; (id = completeID(msg->nick));) { urlScan(id, msg->nick, msg->params[0]); uiFormat( id, Cold, tagTime(msg), -- cgit 1.4.1-2-gfad0