From 160bb3a3a1fad035e0c483f47b06c525189550e0 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Tue, 21 May 2013 14:42:28 +0200 Subject: trafgen: Remove unnecessary reinitialization of icmp packet The entire packet is zeroed using memset() three lines above, thus there is no need to set icmp->code and icmp->checksum to 0 explicitely again. Signed-off-by: Tobias Klauser --- trafgen.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/trafgen.c b/trafgen.c index 16cce28..82cc3db 100644 --- a/trafgen.c +++ b/trafgen.c @@ -465,8 +465,6 @@ static int xmit_smoke_probe(int icmp_sock, struct ctx *ctx) memset(outpack, 0, sizeof(outpack)); icmp = (void *) outpack; icmp->type = ICMP_ECHO; - icmp->code = 0; - icmp->checksum = 0; icmp->un.echo.id = ident; icmp->un.echo.sequence = htons(cnt++); -- cgit v1.2.3-54-g00ecf