]> jfr.im git - irc/charybdis-ircd/charybdis.git/commitdiff
libratbox/src/commio.c: misc cleanup for compiler warning
authorAaron Jones <redacted>
Mon, 31 Jul 2017 05:54:10 +0000 (05:54 +0000)
committerAaron Jones <redacted>
Fri, 4 Aug 2017 12:32:57 +0000 (12:32 +0000)
commio.c:1269:17: warning: possible misuse of comma operator here
                  [-Wcomma]

What an ugly way to use commas!

libratbox/src/commio.c

index ba0e0f1d4b3577467b3eae1d6feb0429e06cab41..5607468f8c541d07afa2135d46016dc867d386ad 100644 (file)
@@ -1266,7 +1266,10 @@ inet_ntop6(const unsigned char *src, char *dst, unsigned int size)
                if(words[i] == 0)
                {
                        if(cur.base == -1)
-                               cur.base = i, cur.len = 1;
+                       {
+                               cur.base = i;
+                               cur.len = 1;
+                       }
                        else
                                cur.len++;
                }