UDP stats scanf has too many arguments
Status: Beta
Brought to you by:
timcook
The following patch fixes this compiler warning:
nicstat.c: In function ‘load_snmp’:
nicstat.c:1569:8: warning: too many arguments for format [-Wformat-extra-args]
diff --git a/nicstat.c b/nicstat.c
index b2fd5f6..33e8e75 100644
--- a/nicstat.c
+++ b/nicstat.c
@@ -1566,7 +1566,7 @@ load_snmp(FILE *snmp)
n = fscanf(snmp, "Udp: %lld %lld %lld %lld "
"%lld %lld\n",
&ll[0], &ll[1], &ll[2], &ll[3],
- &ll[4], &ll[5], &ll[6]);
+ &ll[4], &ll[5]);
if (n == 6) {
g_udp_new->inDatagrams = ll[0];
g_udp_new->outDatagrams = ll[3];
Fixing in my fork https://github.com/scotte/nicstat along with the other bugs here.