]> jfr.im git - solanum.git/commitdiff
IRCD_BUFSIZE is redundant with BUFSIZE, so kill it.
authorElizabeth Myers <redacted>
Wed, 23 Mar 2016 14:22:55 +0000 (09:22 -0500)
committerElizabeth Myers <redacted>
Wed, 23 Mar 2016 14:22:55 +0000 (09:22 -0500)
include/blacklist.h
include/common.h
include/s_conf.h
ircd/blacklist.c
ircd/newconf.c
ircd/s_user.c
ircd/send.c
modules/cap_server_time.c

index 652f12b40d530af776317cc854a7c45d85988bfa..7c8fc23ee517d2eb8f546fe6a10b75e91c9498c3 100644 (file)
@@ -36,7 +36,7 @@ struct Blacklist {
        int ipv6;       /* Does this blacklist support IPv6 lookups? */
        char host[IRCD_RES_HOSTLEN + 1];
        rb_dlink_list filters;  /* Filters for queries */
-       char reject_reason[IRCD_BUFSIZE];
+       char reject_reason[BUFSIZE];
        unsigned int hits;
        time_t lastwarning;
 };
index 676b6b9cfe45cab3f540387dec9a8f027a14e7fd..58b52ac45870d210999a74bf516c2bc382de1cd8 100644 (file)
@@ -30,9 +30,6 @@
 #define IRCD_MAX(a, b)  ((a) > (b) ? (a) : (b))
 #define IRCD_MIN(a, b)  ((a) < (b) ? (a) : (b))
 
-/* Right out of the RFC */
-#define IRCD_BUFSIZE 512
-
 /* readbuf size */
 #define READBUF_SIZE 16384
 
index 49a0d1e8519c615c0c0264aa91bbbe973d7a7370..b4bd821c232c61bc285a7d7f566fc4cfbecbec91 100644 (file)
@@ -389,7 +389,7 @@ extern int yylex(void);
 
 extern unsigned long cidr_to_bitmask[];
 
-extern char conffilebuf[IRCD_BUFSIZE + 1];
+extern char conffilebuf[BUFSIZE + 1];
 extern int lineno;
 
 #define NOT_AUTHORISED  (-1)
index ae3f10ee0ea3894854688c22d1aada75324f7b2b..47438438f4dd298e65f6f358409ff97a3df7156d 100644 (file)
@@ -227,7 +227,7 @@ struct Blacklist *new_blacklist(char *name, char *reject_reason, int ipv4, int i
                blptr->status &= ~CONF_ILLEGAL;
 
        rb_strlcpy(blptr->host, name, IRCD_RES_HOSTLEN + 1);
-       rb_strlcpy(blptr->reject_reason, reject_reason, IRCD_BUFSIZE);
+       rb_strlcpy(blptr->reject_reason, reject_reason, BUFSIZE);
        blptr->ipv4 = ipv4;
        blptr->ipv6 = ipv6;
 
index 974f798b51929a812fda2f47dbbdc09ceb76c0e3..827f6ed90badf992c9a3e4df8a12e61084a465f8 100644 (file)
@@ -2030,10 +2030,10 @@ void
 conf_report_error(const char *fmt, ...)
 {
        va_list ap;
-       char msg[IRCD_BUFSIZE + 1] = { 0 };
+       char msg[BUFSIZE + 1] = { 0 };
 
        va_start(ap, fmt);
-       vsnprintf(msg, IRCD_BUFSIZE, fmt, ap);
+       vsnprintf(msg, BUFSIZE, fmt, ap);
        va_end(ap);
 
        if (testing_conf)
@@ -2050,10 +2050,10 @@ void
 conf_report_warning(const char *fmt, ...)
 {
        va_list ap;
-       char msg[IRCD_BUFSIZE + 1] = { 0 };
+       char msg[BUFSIZE + 1] = { 0 };
 
        va_start(ap, fmt);
-       vsnprintf(msg, IRCD_BUFSIZE, fmt, ap);
+       vsnprintf(msg, BUFSIZE, fmt, ap);
        va_end(ap);
 
        if (testing_conf)
index 46a1ee61cd08f35293f00cdc1afc8f0c6b0317dc..1f6a4cb40a0df7da81ee300e45673c6083e81eaf 100644 (file)
@@ -219,7 +219,7 @@ register_local_user(struct Client *client_p, struct Client *source_p)
 {
        struct ConfItem *aconf, *xconf;
        struct User *user = source_p->user;
-       char tmpstr2[IRCD_BUFSIZE];
+       char tmpstr2[BUFSIZE];
        char ipaddr[HOSTIPLEN];
        char myusername[USERLEN+1];
        int status;
index a733f0497e4a8c4c09875633fce96f9971ecefde..44cb04984935454b1920a897588e9fc77244e7d1 100644 (file)
@@ -218,7 +218,7 @@ send_queued_write(rb_fde_t *F, void *data)
 static void
 linebuf_put_msgvbuf(struct MsgBuf *msgbuf, buf_head_t *linebuf, unsigned int capmask, const char *pattern, va_list *va)
 {
-       char buf[IRCD_BUFSIZE];
+       char buf[BUFSIZE];
 
        rb_linebuf_newbuf(linebuf);
        msgbuf_unparse_prefix(buf, sizeof buf, msgbuf, capmask);
@@ -497,7 +497,7 @@ void
 sendto_channel_flags(struct Client *one, int type, struct Client *source_p,
                     struct Channel *chptr, const char *pattern, ...)
 {
-       char buf[IRCD_BUFSIZE];
+       char buf[BUFSIZE];
        va_list args;
        buf_head_t rb_linebuf_local;
        buf_head_t rb_linebuf_id;
index 3119319f93592c4f1ea3c6b879cf872587f3eb65..73fce0170ebc96fff8880bd8452bcdbc711a0ca5 100644 (file)
@@ -52,7 +52,7 @@ mapi_cap_list_av2 cap_server_time_cap_list[] = {
 static void
 cap_server_time_process(hook_data *data)
 {
-       static char buf[IRCD_BUFSIZE];
+       static char buf[BUFSIZE];
        time_t ts = rb_current_time();
        struct MsgBuf *msgbuf = data->arg1;