From b31121671cdb2c0c365d3c464138da76abbdc680 Mon Sep 17 00:00:00 2001 From: "rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b" Date: Fri, 8 Aug 2008 10:50:21 +0000 Subject: [PATCH] Removed pointless checks for buf existing, as they always will for non pointers. git-svn-id: svn://svn.anope.org/anope/trunk@1407 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1122 5417fbe8-f217-4b02-8779-1006273d7864 --- Changes | 1 + src/send.c | 25 ------------------------- 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/Changes b/Changes index c60566c3c..75f11cbea 100644 --- a/Changes +++ b/Changes @@ -46,6 +46,7 @@ Anope Version S V N 05/12 F moduleNoticeLang() now calls notice_user instead of notice(). [ #00] Provided by Robin Burchell - 2008 +08/08 F Strict warnings in send.c from comparing address of non-ptr [ #00] 08/08 F Removed sa-commands from inspircd protocol support. [ #00] Provided by Christian Schroer - 2008 diff --git a/src/send.c b/src/send.c index 77a93d013..6d57a9823 100644 --- a/src/send.c +++ b/src/send.c @@ -52,10 +52,6 @@ void vsend_cmd(const char *source, const char *fmt, va_list args) if (fmt) { vsnprintf(buf, BUFSIZE - 1, fmt, args); - if (!buf) { - return; - } - if (source) { sockprintf(servsock, ":%s %s\r\n", source, buf); eventprintf(":%s %s", source, buf); @@ -92,11 +88,6 @@ void notice_server(char *source, Server * s, char *fmt, ...) va_start(args, fmt); vsnprintf(buf, BUFSIZE - 1, fmt, args); - if (!buf) { - va_end(args); - return; - } - if (NSDefFlags & NI_MSG) { anope_cmd_serv_privmsg(source, s->name, buf); } else { @@ -126,11 +117,6 @@ void notice_user(char *source, User * u, const char *fmt, ...) va_start(args, fmt); vsnprintf(buf, BUFSIZE - 1, fmt, args); - if (!buf) { - va_end(args); - return; - } - /* Send privmsg instead of notice if: * - UsePrivmsg is enabled * - The user is not registered and NSDefMsg is enabled @@ -296,11 +282,6 @@ void notice(char *source, char *dest, const char *fmt, ...) va_start(args, fmt); vsnprintf(buf, BUFSIZE - 1, fmt, args); - if (!buf) { - va_end(args); - return; - } - if (NSDefFlags & NI_MSG) { anope_cmd_privmsg2(source, dest, buf); } else { @@ -332,9 +313,6 @@ void privmsg(char *source, char *dest, const char *fmt, ...) va_end(args); } - if (!buf) { - return; - } anope_cmd_privmsg2(source, dest, buf); } @@ -358,9 +336,6 @@ void wallops(char *source, const char *fmt, ...) vsnprintf(buf, BUFSIZE - 1, fmt, args); va_end(args); } - if (!buf) { - return; - } anope_cmd_global_legacy(source, buf); }