ifenslave: Fix unused variable warnings.
authorDavid S. Miller <davem@davemloft.net>
Sat, 26 Nov 2011 21:54:17 +0000 (16:54 -0500)
committerDavid S. Miller <davem@davemloft.net>
Sat, 26 Nov 2011 21:54:17 +0000 (16:54 -0500)
Documentation/networking/ifenslave.c: In function ‘if_getconfig’:
Documentation/networking/ifenslave.c:508:14: warning: variable ‘mtu’ set but not used [-Wunused-but-set-variable]
Documentation/networking/ifenslave.c:508:6: warning: variable ‘metric’ set but not used [-Wunused-but-set-variable]

The purpose of this function is to simply print out the values
it probes, so...

Signed-off-by: David S. Miller <davem@davemloft.net>
Documentation/networking/ifenslave.c

index 65968fbf1e49cb3b35d64da63365cc7e9c085601..ac5debb2f16c35a048a173811f1846364f2c6585 100644 (file)
@@ -539,12 +539,14 @@ static int if_getconfig(char *ifname)
                metric = 0;
        } else
                metric = ifr.ifr_metric;
+       printf("The result of SIOCGIFMETRIC is %d\n", metric);
 
        strcpy(ifr.ifr_name, ifname);
        if (ioctl(skfd, SIOCGIFMTU, &ifr) < 0)
                mtu = 0;
        else
                mtu = ifr.ifr_mtu;
+       printf("The result of SIOCGIFMTU is %d\n", mtu);
 
        strcpy(ifr.ifr_name, ifname);
        if (ioctl(skfd, SIOCGIFDSTADDR, &ifr) < 0) {