From 690afe927ad651f9737d0b3d98fb6ca1e2b839af Mon Sep 17 00:00:00 2001 From: Sebastien GODARD Date: Sun, 27 Mar 2022 15:35:51 +0200 Subject: [PATCH] sar: A_NET_SOFT: Make sure backlog length variable is set to zero Signed-off-by: Sebastien GODARD --- rd_stats.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rd_stats.c b/rd_stats.c index 0bee03c..8e1364b 100644 --- a/rd_stats.c +++ b/rd_stats.c @@ -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), -- 2.40.0