From f8190b7233871b5b47c3fc8846731d1bbdef78a5 Mon Sep 17 00:00:00 2001 From: "Maciej S. Szmigiero" Date: Tue, 16 Apr 2019 14:19:48 +0200 Subject: [PATCH] Revert "Work around a GCC bug that causes inet_checksum() to give wrong results." This reverts commit 7c73cb3ace6659df58ec2382b8d47bb521dad886. --- src/route.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/route.c b/src/route.c index fc08f5f..2e8d94a 100644 --- a/src/route.c +++ b/src/route.c @@ -59,7 +59,6 @@ static const size_t opt_size = sizeof(struct nd_opt_hdr); #define MAX(a, b) ((a) > (b) ? (a) : (b)) #endif -volatile int dummy; static timeout_t age_subnets_timeout; /* RFC 1071 */ @@ -81,11 +80,6 @@ static uint16_t inet_checksum(void *data, int len, uint16_t prevsum) { checksum = (checksum & 0xFFFF) + (checksum >> 16); } - // Work around a compiler optimization bug. - if(checksum) { - dummy = 1; - } - return ~checksum; } -- 2.25.1