From 3d291155a2a10868140d3e8bd7342b9150f42a0f Mon Sep 17 00:00:00 2001 From: Francois-Xavier Le Bail Date: Sun, 14 Jan 2018 18:25:02 +0100 Subject: [PATCH] Zephyr: Simplify the initialization of a structure --- print-zephyr.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/print-zephyr.c b/print-zephyr.c index 2addd388..8bf7fb52 100644 --- a/print-zephyr.c +++ b/print-zephyr.c @@ -144,7 +144,7 @@ str_to_lower(const char *string) void zephyr_print(netdissect_options *ndo, const u_char *cp, int length) { - struct z_packet z; + struct z_packet z = {0}; const char *parse = (const char *) cp; int parselen = length; const char *s; @@ -153,13 +153,6 @@ zephyr_print(netdissect_options *ndo, const u_char *cp, int length) /* squelch compiler warnings */ - z.kind = 0; - z.class = 0; - z.inst = 0; - z.opcode = 0; - z.sender = 0; - z.recipient = 0; - #define PARSE_STRING \ s = parse_field(ndo, &parse, &parselen, &truncated); \ if (truncated) goto trunc; \