]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-zephyr.c
Use the EXTRACT_U_1() macro in some utility functions
[tcpdump] / print-zephyr.c
index 2addd388cb3fd114a5dc85969ae6ba4292791506..01e34ed8aa92b422a9cca7320b4f95db6b05fe2a 100644 (file)
 /* \summary: Zephyr printer */
 
 #ifdef HAVE_CONFIG_H
-#include "config.h"
+#include <config.h>
 #endif
 
-#include <netdissect-stdinc.h>
+#include "netdissect-stdinc.h"
 
 #include <stdio.h>
 #include <string.h>
@@ -144,7 +144,25 @@ 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 = {
+        NULL,  /* version */
+        0,     /* numfields */
+        0,     /* kind */
+        NULL,  /* uid */
+        0,     /* port */
+        0,     /* auth */
+        0,     /* authlen */
+        NULL,  /* authdata */
+        NULL,  /* class */
+        NULL,  /* inst */
+        NULL,  /* opcode */
+        NULL,  /* sender */
+        NULL,  /* recipient */
+        NULL,  /* format */
+        0,     /* cksum */
+        0,     /* multi */
+        NULL   /* multi_uid */
+    };
     const char *parse = (const char *) cp;
     int parselen = length;
     const char *s;
@@ -153,13 +171,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;                              \