diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2017-04-12 10:57:13 +0200 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2017-04-12 10:58:38 +0200 |
commit | 4a4b85aac16ccb59f01700ee8fb903dcdc7fcf65 (patch) | |
tree | e606fb4a0d2eccedd50a483c25b5950530dc8012 | |
parent | eedf26d355b3dcbaa8324db678868fe11e57d5ce (diff) |
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 <tklauser@distanz.ch>
-rw-r--r-- | netsniff-ng.c | 6 |
1 files changed, 0 insertions, 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) |