Zephyr: Simplify the initialization of a structure

This commit is contained in:
Francois-Xavier Le Bail 2018-01-14 18:25:02 +01:00
parent e319ff0ab2
commit 3d291155a2

View File

@ -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; \