Fix some memory counting buglets.
[ircu2.10.12-pk.git] / ircd / s_debug.c
index c1e6169e3d68d939a5238ec9f30b4f5bb5cd6fc9..6df059bbf00765a5db22b1a46e72ef104d5d9333 100644 (file)
@@ -292,7 +292,7 @@ void count_memory(struct Client *cptr, const struct StatDesc *sd,
     chm += (strlen(chptr->chname) + sizeof(struct Channel));
     for (link = chptr->invites; link; link = link->next)
       chi++;
-    for (ban = chptr->banlist; link; ban = ban->next)
+    for (ban = chptr->banlist; ban; ban = ban->next)
     {
       chb++;
       chbm += strlen(ban->who) + strlen(ban->banstr) + 2 + sizeof(*ban);
@@ -335,7 +335,7 @@ void count_memory(struct Client *cptr, const struct StatDesc *sd,
   send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG,
             ":Channels %d(%zu) Bans %d(%zu)", ch, chm, chb, chbm);
   send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG,
-            ":Channel membrs %d(%zu) invite %d(%zu)", memberships,
+            ":Channel members %d(%zu) invite %d(%zu)", memberships,
             memberships * sizeof(struct Membership), chi,
             chi * sizeof(struct SLink));