]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - misc/nstat.c
misc: avoid snprintf warnings in ss and nstat
[mirror_iproute2.git] / misc / nstat.c
index a4dd405d43a93e86e712475eb3b9e3e733bee839..433a1f483be3fecf5e56b988b1ca40ae2af45004 100644 (file)
@@ -178,12 +178,12 @@ static int count_spaces(const char *line)
 
 static void load_ugly_table(FILE *fp)
 {
-       char buf[4096];
+       char buf[2048];
        struct nstat_ent *db = NULL;
        struct nstat_ent *n;
 
        while (fgets(buf, sizeof(buf), fp) != NULL) {
-               char idbuf[sizeof(buf)];
+               char idbuf[4096];
                int  off;
                char *p;
                int count1, count2, skip = 0;