]> jfr.im git - solanum.git/blobdiff - modules/m_map.c
client: refactor del_all_accepts to allow skipping own accept list
[solanum.git] / modules / m_map.c
index 8675fed8e4918f20eae0939bb8df1ef1bc4cd6ec..d6aa971c7306484d684b06d3ce1b0c26345c63db 100644 (file)
@@ -108,7 +108,7 @@ dump_map(struct Client *client_p, struct Client *root_p, char *pbuf)
        }
 
        frac = (1000 * rb_dlink_list_length(&root_p->serv->users) + Count.total / 2) / Count.total;
-       snprintf(buf + USER_COL, BUFSIZE - USER_COL,
+       snprintf(buf + USER_COL, sizeof buf - USER_COL,
                 " | Users: %5lu (%2d.%1d%%)", rb_dlink_list_length(&root_p->serv->users),
                 frac / 10, frac % 10);
 
@@ -157,7 +157,7 @@ flattened_map(struct Client *client_p)
        rb_dlink_node *ptr;
        struct Client *target_p;
        int i, len;
-       int cnt = 0;
+       unsigned long cnt = 0;
 
        /* First display me as the root */
        rb_strlcpy(buf, me.name, BUFSIZE);
@@ -172,7 +172,7 @@ flattened_map(struct Client *client_p)
                }
        }
 
-       snprintf(buf + USER_COL, BUFSIZE - USER_COL,
+       snprintf(buf + USER_COL, sizeof buf - USER_COL,
                " | Users: %5lu (%4.1f%%)", rb_dlink_list_length(&me.serv->users),
                100 * (float) rb_dlink_list_length(&me.serv->users) / (float) Count.total);
 
@@ -210,7 +210,7 @@ flattened_map(struct Client *client_p)
                        }
                }
 
-               snprintf(buf + USER_COL, BUFSIZE - USER_COL,
+               snprintf(buf + USER_COL, sizeof buf - USER_COL,
                        " | Users: %5lu (%4.1f%%)", rb_dlink_list_length(&target_p->serv->users),
                        100 * (float) rb_dlink_list_length(&target_p->serv->users) / (float) Count.total);