diff options
Diffstat (limited to 'trafgen_parser.y')
-rw-r--r-- | trafgen_parser.y | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/trafgen_parser.y b/trafgen_parser.y index 656c4f6..74015b5 100644 --- a/trafgen_parser.y +++ b/trafgen_parser.y @@ -167,10 +167,10 @@ static inline void __setup_new_csum16(struct csum16 *s, off_t from, off_t to, s->which = which; } -void realloc_packet(void) +struct packet *realloc_packet(void) { if (test_ignore()) - return; + return NULL; plen++; packets = xrealloc(packets, plen * sizeof(*packets)); @@ -184,6 +184,8 @@ void realloc_packet(void) __init_new_randomizer_slot(&packet_dyn[packetd_last]); __init_new_csum_slot(&packet_dyn[packetd_last]); __init_new_fields_slot(&packet_dyn[packetd_last]); + + return &packets[packet_last]; } struct packet *current_packet(void) |