From f76ca178481e19b6e46efa64c3dfbb3b60e0315e Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Mon, 24 Feb 2014 00:10:42 +0100 Subject: [PATCH] stats c: Simplify construction of flags string. Perhaps this avoids false positives in static analysis. --- modules/m_stats.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/m_stats.c b/modules/m_stats.c index 895ebf46..11565681 100644 --- a/modules/m_stats.c +++ b/modules/m_stats.c @@ -301,7 +301,6 @@ stats_connect(struct Client *source_p) if(ServerConfIllegal(server_p)) continue; - buf[0] = '\0'; s = buf; if(IsOper(source_p)) @@ -316,7 +315,7 @@ stats_connect(struct Client *source_p) *s++ = 'Z'; } - if(!buf[0]) + if(s == buf) *s++ = '*'; *s = '\0';