Commit 450faacc authored by David S. Miller's avatar David S. Miller

ifenslave: Fix unused variable warnings.

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: default avatarDavid S. Miller <davem@davemloft.net>
parent 49f5ed42
...@@ -539,12 +539,14 @@ static int if_getconfig(char *ifname) ...@@ -539,12 +539,14 @@ static int if_getconfig(char *ifname)
metric = 0; metric = 0;
} else } else
metric = ifr.ifr_metric; metric = ifr.ifr_metric;
printf("The result of SIOCGIFMETRIC is %d\n", metric);
strcpy(ifr.ifr_name, ifname); strcpy(ifr.ifr_name, ifname);
if (ioctl(skfd, SIOCGIFMTU, &ifr) < 0) if (ioctl(skfd, SIOCGIFMTU, &ifr) < 0)
mtu = 0; mtu = 0;
else else
mtu = ifr.ifr_mtu; mtu = ifr.ifr_mtu;
printf("The result of SIOCGIFMTU is %d\n", mtu);
strcpy(ifr.ifr_name, ifname); strcpy(ifr.ifr_name, ifname);
if (ioctl(skfd, SIOCGIFDSTADDR, &ifr) < 0) { if (ioctl(skfd, SIOCGIFDSTADDR, &ifr) < 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment