fix cppcheck note
authorChristian Göttsche <cgzones@googlemail.com>
Sun, 4 Mar 2018 13:05:59 +0000 (14:05 +0100)
committerChristian Göttsche <cgzones@googlemail.com>
Sun, 4 Mar 2018 13:11:04 +0000 (14:11 +0100)
[src/dbcache.c:166]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'.

src/dbcache.c

index 872947d9223cc94e5c4a802382c2175c9f93a031..77e09bf0e2bf80e736c27ac8bc69f38fe9012324 100644 (file)
@@ -163,7 +163,7 @@ void cachestatus(void)
                        if (!ibwget(p->data.interface, &bwlimit) || bwlimit == 0) {
                                snprintf(bwtemp, 16, " (no limit) ");
                        } else {
-                               snprintf(bwtemp, 16, " (%d Mbit) ", bwlimit);
+                               snprintf(bwtemp, 16, " (%u Mbit) ", bwlimit);
                        }
                        strncat(buffer, p->data.interface, strlen(p->data.interface));
                        strncat(buffer, bwtemp, strlen(bwtemp));