mirror of
https://github.com/the-tcpdump-group/tcpdump.git
synced 2024-11-23 18:14:29 +08:00
Zephyr: Simplify the initialization of a structure
This commit is contained in:
parent
e319ff0ab2
commit
3d291155a2
@ -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; \
|
||||
|
Loading…
Reference in New Issue
Block a user