aboutsummaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2013-11-29 16:43:33 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2013-11-29 16:43:33 +0100
commit9b2a9f0210f13f1c59c0b954c4aa0eeb0a66efd1 (patch)
treea950fa73740d345e11ba1ce90f4fc39ee12516e6 /networking
parent1a7256ac38284caffd2a0de2250364369059be69 (diff)
downloadbusybox-w32-9b2a9f0210f13f1c59c0b954c4aa0eeb0a66efd1.tar.gz
busybox-w32-9b2a9f0210f13f1c59c0b954c4aa0eeb0a66efd1.tar.bz2
busybox-w32-9b2a9f0210f13f1c59c0b954c4aa0eeb0a66efd1.zip
fix assorted unused code and wrong format specs found by cppchekc (bug 6716)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking')
-rw-r--r--networking/tc.c3
-rw-r--r--networking/traceroute.c4
2 files changed, 4 insertions, 3 deletions
diff --git a/networking/tc.c b/networking/tc.c
index b9a4d16cc..533f7c042 100644
--- a/networking/tc.c
+++ b/networking/tc.c
@@ -418,9 +418,6 @@ static int print_class(const struct sockaddr_nl *who UNUSED_PARAM,
418static int print_filter(const struct sockaddr_nl *who UNUSED_PARAM, 418static int print_filter(const struct sockaddr_nl *who UNUSED_PARAM,
419 struct nlmsghdr *hdr, void *arg UNUSED_PARAM) 419 struct nlmsghdr *hdr, void *arg UNUSED_PARAM)
420{ 420{
421 struct tcmsg *msg = NLMSG_DATA(hdr);
422 int len = hdr->nlmsg_len;
423 struct rtattr * tb[TCA_MAX+1];
424 return 0; 421 return 0;
425} 422}
426 423
diff --git a/networking/traceroute.c b/networking/traceroute.c
index 0c18d6c0c..97a7a19e0 100644
--- a/networking/traceroute.c
+++ b/networking/traceroute.c
@@ -791,7 +791,9 @@ static int
791common_traceroute_main(int op, char **argv) 791common_traceroute_main(int op, char **argv)
792{ 792{
793 int minpacket; 793 int minpacket;
794#ifdef IP_TOS
794 int tos = 0; 795 int tos = 0;
796#endif
795 int max_ttl = 30; 797 int max_ttl = 30;
796 int nprobes = 3; 798 int nprobes = 3;
797 int first_ttl = 1; 799 int first_ttl = 1;
@@ -838,8 +840,10 @@ common_traceroute_main(int op, char **argv)
838 if (op & OPT_IP_CHKSUM) 840 if (op & OPT_IP_CHKSUM)
839 bb_error_msg("warning: ip checksums disabled"); 841 bb_error_msg("warning: ip checksums disabled");
840#endif 842#endif
843#ifdef IP_TOS
841 if (op & OPT_TOS) 844 if (op & OPT_TOS)
842 tos = xatou_range(tos_str, 0, 255); 845 tos = xatou_range(tos_str, 0, 255);
846#endif
843 if (op & OPT_MAX_TTL) 847 if (op & OPT_MAX_TTL)
844 max_ttl = xatou_range(max_ttl_str, 1, 255); 848 max_ttl = xatou_range(max_ttl_str, 1, 255);
845 if (op & OPT_PORT) 849 if (op & OPT_PORT)