mirror of
https://github.com/anope/anope.git
synced 2026-07-05 05:33:13 +02:00
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
This commit is contained in:
parent
6d7d43f1c8
commit
b31121671c
@@ -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 <w00t@inspircd.org> - 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 <Christian.Schroer@coderschlampe.com> - 2008
|
||||
|
||||
-25
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user