diff --git a/libratbox/include/rb_tools.h b/libratbox/include/rb_tools.h index f77bfa31..fa813243 100644 --- a/libratbox/include/rb_tools.h +++ b/libratbox/include/rb_tools.h @@ -43,6 +43,8 @@ rb_strlcat(char *dest, const char *src, size_t count) size_t len = strlen(src); size_t res = dsize + len; + assert(dsize >= count); + dest += dsize; count -= dsize; if(len >= count) @@ -101,7 +103,7 @@ rb_strnlen(const char *s, size_t n) return p; } #else -#define rb_strnlen(x) strnlen(x) +#define rb_strnlen(s, n) strnlen(s, n) #endif static inline char * diff --git a/modules/m_topic.c b/modules/m_topic.c index b1713968..aff60123 100644 --- a/modules/m_topic.c +++ b/modules/m_topic.c @@ -62,7 +62,6 @@ m_topic(struct Client *client_p, struct Client *source_p, int parc, const char * { struct Channel *chptr = NULL; struct membership *msptr; - char *p = NULL; if(MyClient(source_p) && !IsFloodDone(source_p)) flood_endgrace(source_p);