ping: fix recently introduced build breakage for non-optimizing builds
authorDenys Vlasenko <vda.linux@googlemail.com>
Tue, 25 Aug 2015 14:26:31 +0000 (16:26 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Tue, 25 Aug 2015 14:26:31 +0000 (16:26 +0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
networking/ping.c

index e1f9ebc3a239aec01d271f45762994d9ac4aebdd..dcbf196821d9df1214fff8d90ae5cb5dc3e5fe62 100644 (file)
@@ -769,7 +769,7 @@ static void ping6(len_and_sockaddr *lsa)
        setsockopt_SOL_SOCKET_int(pingsock, SO_RCVBUF, sockopt);
 
        sockopt = offsetof(struct icmp6_hdr, icmp6_cksum);
-       if (sockopt != 2)
+       if (offsetof(struct icmp6_hdr, icmp6_cksum) != 2)
                BUG_bad_offsetof_icmp6_cksum();
        setsockopt_int(pingsock, SOL_RAW, IPV6_CHECKSUM, sockopt);