Blame SOURCES/0094-ss-Use-C99-initializer-in-netlink_show_one.patch

99be8f
From 60a5c300c8cd0fbd4c378900d298eb2444c0343d Mon Sep 17 00:00:00 2001
99be8f
From: Andrea Claudi <aclaudi@redhat.com>
99be8f
Date: Mon, 29 Apr 2019 20:08:07 +0200
99be8f
Subject: [PATCH] ss: Use C99 initializer in netlink_show_one()
99be8f
99be8f
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1465646
99be8f
Upstream Status: iproute2.git commit 301826beb3baa
99be8f
99be8f
commit 301826beb3baa902e2057d81912d1586459f605f
99be8f
Author: Phil Sutter <phil@nwl.cc>
99be8f
Date:   Mon Aug 21 11:27:02 2017 +0200
99be8f
99be8f
    ss: Use C99 initializer in netlink_show_one()
99be8f
99be8f
    This has the additional benefit of initializing st.ino to zero which is
99be8f
    used later in is_sctp_assoc() function.
99be8f
99be8f
    Signed-off-by: Phil Sutter <phil@nwl.cc>
99be8f
---
99be8f
 misc/ss.c | 13 +++++++------
99be8f
 1 file changed, 7 insertions(+), 6 deletions(-)
99be8f
99be8f
diff --git a/misc/ss.c b/misc/ss.c
99be8f
index cc38fc499c210..7a38e9d830e8d 100644
99be8f
--- a/misc/ss.c
99be8f
+++ b/misc/ss.c
99be8f
@@ -3567,17 +3567,18 @@ static int netlink_show_one(struct filter *f,
99be8f
 				int rq, int wq,
99be8f
 				unsigned long long sk, unsigned long long cb)
99be8f
 {
99be8f
-	struct sockstat st;
99be8f
+	struct sockstat st = {
99be8f
+		.state		= SS_CLOSE,
99be8f
+		.rq		= rq,
99be8f
+		.wq		= wq,
99be8f
+		.local.family	= AF_NETLINK,
99be8f
+		.remote.family	= AF_NETLINK,
99be8f
+	};
99be8f
 
99be8f
 	SPRINT_BUF(prot_buf) = {};
99be8f
 	const char *prot_name;
99be8f
 	char procname[64] = {};
99be8f
 
99be8f
-	st.state = SS_CLOSE;
99be8f
-	st.rq	 = rq;
99be8f
-	st.wq	 = wq;
99be8f
-	st.local.family = st.remote.family = AF_NETLINK;
99be8f
-
99be8f
 	if (f->f) {
99be8f
 		st.rport = -1;
99be8f
 		st.lport = pid;
99be8f
-- 
99be8f
2.20.1
99be8f