]> granicus.if.org Git - sysstat/commitdiff
sar: A_NET_SOFT: Make sure backlog length variable is set to zero
authorSebastien GODARD <sysstat@users.noreply.github.com>
Sun, 27 Mar 2022 13:35:51 +0000 (15:35 +0200)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Sun, 27 Mar 2022 13:35:51 +0000 (15:35 +0200)
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
rd_stats.c

index 0bee03c7df2bb5038b7a5af5d91e0a6687c1af4b..8e1364bdc2ce85e63a0d4507d6e707455d4707c2 100644 (file)
@@ -2813,6 +2813,9 @@ int read_softnet(struct stats_softnet *st_softnet, __nr_t nr_alloc,
 
        while (fgets(line, sizeof(line), fp) != NULL) {
 
+               /* Softnet backlog length may be not available */
+               st_softnet_read.backlog_len = 0;
+
                i = sscanf(line, "%x %x %x %*x %*x %*x %*x %*x %*x %x %x %x %x",
                           &(st_softnet_read.processed),
                           &(st_softnet_read.dropped),