summaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorDenys Vlasenko2013-11-29 16:43:33 +0100
committerDenys Vlasenko2013-11-29 16:43:33 +0100
commit9b2a9f0210f13f1c59c0b954c4aa0eeb0a66efd1 (patch)
treea950fa73740d345e11ba1ce90f4fc39ee12516e6 /networking
parent1a7256ac38284caffd2a0de2250364369059be69 (diff)
downloadbusybox-9b2a9f0210f13f1c59c0b954c4aa0eeb0a66efd1.zip
busybox-9b2a9f0210f13f1c59c0b954c4aa0eeb0a66efd1.tar.gz
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 b9a4d16..533f7c0 100644
--- a/networking/tc.c
+++ b/networking/tc.c
@@ -418,9 +418,6 @@ static int print_class(const struct sockaddr_nl *who UNUSED_PARAM,
static int print_filter(const struct sockaddr_nl *who UNUSED_PARAM,
struct nlmsghdr *hdr, void *arg UNUSED_PARAM)
{
- struct tcmsg *msg = NLMSG_DATA(hdr);
- int len = hdr->nlmsg_len;
- struct rtattr * tb[TCA_MAX+1];
return 0;
}
diff --git a/networking/traceroute.c b/networking/traceroute.c
index 0c18d6c..97a7a19 100644
--- a/networking/traceroute.c
+++ b/networking/traceroute.c
@@ -791,7 +791,9 @@ static int
common_traceroute_main(int op, char **argv)
{
int minpacket;
+#ifdef IP_TOS
int tos = 0;
+#endif
int max_ttl = 30;
int nprobes = 3;
int first_ttl = 1;
@@ -838,8 +840,10 @@ common_traceroute_main(int op, char **argv)
if (op & OPT_IP_CHKSUM)
bb_error_msg("warning: ip checksums disabled");
#endif
+#ifdef IP_TOS
if (op & OPT_TOS)
tos = xatou_range(tos_str, 0, 255);
+#endif
if (op & OPT_MAX_TTL)
max_ttl = xatou_range(max_ttl_str, 1, 255);
if (op & OPT_PORT)