Thread (52 messages) 52 messages, 5 authors, 2018-03-27

[PATCH v2 iproute2-next 2/6] rdma: initialize the rd struct

flat view
STALE3128d SUPERSEDED

From: Steve Wise <hidden>
Date: 2018-03-02 20:10:36
Subsystem: the rest · Maintainer: Linus Torvalds

Revision v2 of 4 in this series.

Revisions (4)
  1. rfc [diff vs current]
  2. v2 current
  3. v3 [diff vs current]
  4. v4 [diff vs current]
Initialize the rd struct so port_idx is 0 unless set otherwise.
Otherwise, strict_port queries end up passing an uninitialized PORT
nlattr.

Signed-off-by: Steve Wise <redacted>
---
 rdma/rdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rdma/rdma.c b/rdma/rdma.c
index 19608f4..c652550 100644
--- a/rdma/rdma.c
+++ b/rdma/rdma.c
@@ -93,7 +93,7 @@ int main(int argc, char **argv)
 	bool show_details = false;
 	bool json_output = false;
 	char *filename;
-	struct rd rd;
+	struct rd rd = {};
 	int opt;
 	int err;
 
-- 
1.8.3.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help