]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
iproute2: use int instead of long for RTAX_HOPLIMIT compare
authorUlrich Weber <uweber@astaro.com>
Fri, 23 Jul 2010 13:39:10 +0000 (15:39 +0200)
committerStephen Hemminger <stephen.hemminger@vyatta.com>
Fri, 23 Jul 2010 16:01:01 +0000 (09:01 -0700)
otherwise "if ((int)val == -1)" will never match on 64 bit systems

Signed-off-by: Ulrich Weber <uweber@astaro.com>
ip/iproute.c

index 04b253a40a1959bcdccbe17e843d24c70f7fb213..711576ead2f6f6fa5297e500e52f24c34852d5b0 100644 (file)
@@ -494,7 +494,7 @@ int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
                        val = *(unsigned*)RTA_DATA(mxrta[i]);
                        switch (i) {
                        case RTAX_HOPLIMIT:
-                               if ((long)val == -1)
+                               if ((int)val == -1)
                                        val = 0;
                                /* fall through */
                        default: