summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgeniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2008-02-05 13:51:50 +0000
committergeniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2008-02-05 13:51:50 +0000
commit3ccf2f6e53fb67acf3092b39a65da722d49ff347 (patch)
tree0538566eb10fb80c4b94aa304ace37966c20e28b
parent4dd8573f2034e50f381927ea393b3cc79e54e0f3 (diff)
BUILD : 1.7.21 (1369) BUGS : 685 NOTES : Fixed some small compiler warnings about buffer addresses always evaluating to true
git-svn-id: svn://svn.anope.org/anope/trunk@1369 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1084 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r--Changes1
-rw-r--r--src/modules/cs_appendtopic.c7
-rw-r--r--src/protocol/charybdis.c2
-rw-r--r--src/protocol/ratbox.c2
-rw-r--r--version.log6
5 files changed, 11 insertions, 7 deletions
diff --git a/Changes b/Changes
index 455633b92..906513cdf 100644
--- a/Changes
+++ b/Changes
@@ -23,6 +23,7 @@ Anope Version S V N
02/04 F No variable for NSReleaseTimeout in NICK_RECOVERED message. [#848]
02/04 F Added missed NickServ HELP for RESEND command. [#847]
02/08 F Updated config.guess and config.sub from upstream. [#853]
+02/08 F Various small compiler warnings. [#685]
Provided by Jan Milants <jan_renee@msn.com> - 2008
01/16 F Server traversion with next_server() failed to list all servers. [#831]
diff --git a/src/modules/cs_appendtopic.c b/src/modules/cs_appendtopic.c
index f055e4a38..7e0d27bb4 100644
--- a/src/modules/cs_appendtopic.c
+++ b/src/modules/cs_appendtopic.c
@@ -129,13 +129,13 @@ int my_cs_appendtopic(User * u)
strscpy(topic, newtopic, sizeof(topic));
}
- ci->last_topic = topic ? sstrdup(topic) : NULL;
+ ci->last_topic = *topic ? sstrdup(topic) : NULL;
strscpy(ci->last_topic_setter, u->nick, NICKMAX);
ci->last_topic_time = time(NULL);
if (c->topic)
free(c->topic);
- c->topic = topic ? sstrdup(topic) : NULL;
+ c->topic = *topic ? sstrdup(topic) : NULL;
strscpy(c->topic_setter, u->nick, NICKMAX);
if (ircd->topictsbackward)
c->topic_time = c->topic_time - 1;
@@ -151,8 +151,7 @@ int my_cs_appendtopic(User * u)
anope_cmd_mode(NULL, c->name, "+o %s", s_ChanServ);
}
}
- anope_cmd_topic(whosends(ci), c->name, u->nick, topic ? topic : "",
- c->topic_time);
+ anope_cmd_topic(whosends(ci), c->name, u->nick, topic, c->topic_time);
if (ircd->join2set) {
if (whosends(ci) == s_ChanServ) {
anope_cmd_part(s_ChanServ, c->name, NULL);
diff --git a/src/protocol/charybdis.c b/src/protocol/charybdis.c
index 39c660221..002cd23b3 100644
--- a/src/protocol/charybdis.c
+++ b/src/protocol/charybdis.c
@@ -1410,7 +1410,7 @@ void charybdis_cmd_tmode(char *source, char *dest, const char *fmt, ...)
vsnprintf(buf, BUFSIZE - 1, fmt, args);
va_end(args);
}
- if (!buf) {
+ if (!*buf) {
return;
}
diff --git a/src/protocol/ratbox.c b/src/protocol/ratbox.c
index 842b55c0b..6bc0f1b5c 100644
--- a/src/protocol/ratbox.c
+++ b/src/protocol/ratbox.c
@@ -1346,7 +1346,7 @@ void ratbox_cmd_tmode(char *source, char *dest, const char *fmt, ...)
vsnprintf(buf, BUFSIZE - 1, fmt, args);
va_end(args);
}
- if (!buf) {
+ if (!*buf) {
return;
}
diff --git a/version.log b/version.log
index 5d09fe2fd..40699f520 100644
--- a/version.log
+++ b/version.log
@@ -9,10 +9,14 @@ VERSION_MAJOR="1"
VERSION_MINOR="7"
VERSION_PATCH="21"
VERSION_EXTRA="-svn"
-VERSION_BUILD="1368"
+VERSION_BUILD="1369"
# $Log$
#
+# BUILD : 1.7.21 (1369)
+# BUGS : 685
+# NOTES : Fixed some small compiler warnings about buffer addresses always evaluating to true
+#
# BUILD : 1.7.21 (1368)
# BUGS : 853
# NOTES : Updated config.guess and config.sub from upstream (GNU)