]> jfr.im git - solanum.git/blobdiff - ircd/hash.c
Add a comment explaining match_arrange_stars
[solanum.git] / ircd / hash.c
index 0d3fb1287935e0b7a5fa66eb9784a9de4efa3a77..cd8e8aa8dc31c4262bf7f167d21b0d548f5f6d75 100644 (file)
@@ -405,7 +405,7 @@ find_channel(const char *name)
  *  block, if it didn't exist before).
  */
 struct Channel *
-get_or_create_channel(struct Client *client_p, const char *chname, int *isnew)
+get_or_create_channel(struct Client *client_p, const char *chname, bool *isnew)
 {
        struct Channel *chptr;
        int len;
@@ -426,7 +426,7 @@ get_or_create_channel(struct Client *client_p, const char *chname, int *isnew)
                }
                len = CHANNELLEN;
                t = LOCAL_COPY(s);
-               *(t + CHANNELLEN) = '\0';
+               t[len] = '\0';
                s = t;
        }
 
@@ -434,12 +434,12 @@ get_or_create_channel(struct Client *client_p, const char *chname, int *isnew)
        if (chptr != NULL)
        {
                if (isnew != NULL)
-                       *isnew = 0;
+                       *isnew = false;
                return chptr;
        }
 
        if(isnew != NULL)
-               *isnew = 1;
+               *isnew = true;
 
        chptr = allocate_channel(s);
        chptr->channelts = rb_current_time();   /* doesn't hurt to set it here */