From: Maciej S. Szmigiero Date: Tue, 16 Apr 2019 12:19:48 +0000 (+0200) Subject: Revert "Work around a GCC bug that causes inet_checksum() to give wrong results." X-Git-Tag: release-1.1pre18~28 X-Git-Url: https://tinc-vpn.org/git/browse?a=commitdiff_plain;h=f8190b7233871b5b47c3fc8846731d1bbdef78a5;p=tinc Revert "Work around a GCC bug that causes inet_checksum() to give wrong results." This reverts commit 7c73cb3ace6659df58ec2382b8d47bb521dad886. --- diff --git a/src/route.c b/src/route.c index fc08f5f7..2e8d94ac 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; }