diff options
author | C. McEnroe | 2020-03-30 19:44:45 -0400 |
---|---|---|
committer | C. McEnroe | 2020-03-30 19:44:45 -0400 |
commit | ff783628268470acc02e52126d6a357691723fba (patch) | |
tree | afde924a98359080d9fc329ea4bd133e50ee735d /handle.c | |
parent | a0dde10cb61ec2c320103a215172841de636bd03 (diff) |
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.
Diffstat (limited to 'handle.c')
-rw-r--r-- | handle.c | 6 |
1 files changed, 2 insertions, 4 deletions
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), |