Skip to content

Commit ec34868

Browse files
davem330gregkh
authored andcommitted
ifenslave: Fix unused variable warnings.
commit 450faac upstream. 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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 7ddaba0 commit ec34868

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Documentation/networking/ifenslave.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,12 +539,14 @@ static int if_getconfig(char *ifname)
539539
metric = 0;
540540
} else
541541
metric = ifr.ifr_metric;
542+
printf("The result of SIOCGIFMETRIC is %d\n", metric);
542543

543544
strcpy(ifr.ifr_name, ifname);
544545
if (ioctl(skfd, SIOCGIFMTU, &ifr) < 0)
545546
mtu = 0;
546547
else
547548
mtu = ifr.ifr_mtu;
549+
printf("The result of SIOCGIFMTU is %d\n", mtu);
548550

549551
strcpy(ifr.ifr_name, ifname);
550552
if (ioctl(skfd, SIOCGIFDSTADDR, &ifr) < 0) {

0 commit comments

Comments
 (0)