httpd: sendfile support
[oweals/busybox.git] / networking / traceroute.c
index 577738a97959d59c1dd624e56e985ad588d3c456..20f304d53a842586846d79569abcdaa2147897b4 100644 (file)
@@ -397,8 +397,8 @@ ifaddrlist(struct IFADDRLIST **ipaddrp)
        ) {
                if (errno == EINVAL)
                        bb_error_msg_and_die(
-                           "SIOCGIFCONF: ifreq struct too small (%d bytes)",
-                           IFREQ_BUFSIZE * sizeof(ibuf[0]));
+                           "SIOCGIFCONF: ifreq struct too small (%u bytes)",
+                           (unsigned)(IFREQ_BUFSIZE * sizeof(ibuf[0])));
                bb_perror_msg_and_die("SIOCGIFCONF");
        }
        ifrp = ibuf;
@@ -445,8 +445,8 @@ ifaddrlist(struct IFADDRLIST **ipaddrp)
                if (strchr(al->device, ':') != NULL)
                        continue;
 #endif
-               if (ioctl(fd, SIOCGIFADDR, (char *)&ifr) < 0)
-                       bb_perror_msg_and_die("SIOCGIFADDR: %s", al->device);
+               ioctl_or_perror_and_die(fd, SIOCGIFADDR, (char *)&ifr,
+                               "SIOCGIFADDR: %s", al->device);
 
                addr_sin = (struct sockaddr_in *)&ifr.ifr_addr;
                al->addr = addr_sin->sin_addr.s_addr;
@@ -700,7 +700,7 @@ send_probe(int seq, int ttl)
 static inline const char *
 pr_type(unsigned char t)
 {
-       static const char * const ttab[] = {
+       static const char *const ttab[] = {
        "Echo Reply",   "ICMP 1",       "ICMP 2",       "Dest Unreachable",
        "Source Quench", "Redirect",    "ICMP 6",       "ICMP 7",
        "Echo",         "Router Advert", "Router Solicit", "Time Exceeded",