From 4a4b85aac16ccb59f01700ee8fb903dcdc7fcf65 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Wed, 12 Apr 2017 10:57:13 +0200 Subject: netsniff-ng: remove unnecessary zeroing of packet counters in init_ctx() The struct ctx in initialized using memset(ctx, 0, sizeof(*ctx) in init_ctx(), so there is no need to zero these members again. Signed-off-by: Tobias Klauser --- netsniff-ng.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/netsniff-ng.c b/netsniff-ng.c index bbffe72..2e18386 100644 --- a/netsniff-ng.c +++ b/netsniff-ng.c @@ -1196,12 +1196,6 @@ static void init_ctx(struct ctx *ctx) ctx->promiscuous = true; ctx->randomize = false; ctx->hwtimestamp = true; - - ctx->pkts_recvd = 0; - ctx->pkts_seen = 0; - ctx->pkts_drops = 0; - ctx->pkts_recvd_last = 0; - ctx->pkts_drops_last = 0; } static void destroy_ctx(struct ctx *ctx) -- cgit v1.2.3-54-g00ecf