From 6f4ed1c01c5b2c0f347870ccefba514eac10234c Mon Sep 17 00:00:00 2001 From: Nikunj A Dadhania Date: Fri, 15 Sep 2017 10:04:36 +0530 Subject: libnet/ipv6: assign times_asked value directly times_asked value remains same as the structure is zeroed, but it makes more sense to do that directly instead of adding with previous value. Signed-off-by: Nikunj A Dadhania Reviewed-by: Thomas Huth Signed-off-by: Alexey Kardashevskiy --- lib/libnet/ipv6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/libnet/ipv6.c b/lib/libnet/ipv6.c index 62a444e..6c6fb54 100644 --- a/lib/libnet/ipv6.c +++ b/lib/libnet/ipv6.c @@ -543,7 +543,7 @@ int send_ipv6(int fd, void* buffer, int len) memset(n, 0, sizeof(struct neighbor)); memcpy(&(n->ip.addr[0]), &ip_dst, 16); n->status = NB_PROBE; - n->times_asked += 1; + n->times_asked = 1; neighbor_add(n); } -- cgit v1.1