diff options
-rw-r--r-- | trafgen_parser.y | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/trafgen_parser.y b/trafgen_parser.y index add8698..1e20cff 100644 --- a/trafgen_parser.y +++ b/trafgen_parser.y @@ -111,13 +111,13 @@ static inline int test_ignore(void) static inline void __init_new_packet_slot(struct packet *slot) { - slot->payload = NULL; - slot->len = 0; + memset(slot, 0, sizeof(*slot)); } static inline void __init_new_counter_slot(struct packet_dyn *slot) { - memset(slot, 0, sizeof(*slot)); + slot->cnt = NULL; + slot->clen = 0; } static inline void __init_new_randomizer_slot(struct packet_dyn *slot) |