IRCD_BUFSIZE is redundant with BUFSIZE, so kill it.

This commit is contained in:
Elizabeth Myers 2016-03-23 09:22:55 -05:00
parent affc871dcb
commit 82236a2a65
8 changed files with 11 additions and 14 deletions

View 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;
};

View 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

View 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)

View 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;

View 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)

View 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;

View 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;

View 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;