wget: don't be careless with xstrdup'ing
[oweals/busybox.git] / networking / traceroute.c
index 80ce5c3ee54c34c980be642c1e74faae197ad7c1..4af52362567a2ef24277fa4fb5edd04c470279b3 100644 (file)
@@ -641,7 +641,7 @@ send_probe(int seq, int ttl, struct timeval *tp)
                        outicmp->icmp_cksum = 0xffff;
        } else
 #endif
-              if (doipcksum) {
+       if (doipcksum) {
                /* Checksum (we must save and restore ip header) */
                tip = *outip;
                ui = (struct udpiphdr *)outip;
@@ -697,7 +697,7 @@ send_probe(int seq, int ttl, struct timeval *tp)
                if (cc < 0)
                        bb_perror_msg_and_die("sendto");
                printf("%s: wrote %s %d chars, ret=%d\n",
-                   bb_applet_name, hostname, packlen, cc);
+                   applet_name, hostname, packlen, cc);
                (void)fflush(stdout);
        }
 }
@@ -788,7 +788,7 @@ packet_ok(unsigned char *buf, int cc, struct sockaddr_in *from, int seq)
                                return (type == ICMP_TIMXCEED ? -1 : code + 1);
                } else
 #endif
-                     {
+               {
                        up = (struct udphdr *)((unsigned char *)hip + hlen);
                        /* XXX 8 is a magic number */
                        if (hlen + 12 <= cc &&
@@ -949,12 +949,12 @@ traceroute_main(int argc, char *argv[])
 
        opterr = 0;
 #ifdef CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE
-       bb_opt_complementally = "x-x:g::";
+       opt_complementary = "x-x:g::";
 #else
-       bb_opt_complementally = "x-x";
+       opt_complementary = "x-x";
 #endif
 
-       op = bb_getopt_ulflags(argc, argv, "FIlnrdvxt:i:m:p:q:s:w:z:f:"
+       op = getopt32(argc, argv, "FIlnrdvxt:i:m:p:q:s:w:z:f:"
 #define USAGE_OP_DONT_FRAGMNT (1<<0)    /* F  */
 #define USAGE_OP_USE_ICMP     (1<<1)    /* I  */
 #define USAGE_OP_TTL_FLAG     (1<<2)    /* l  */
@@ -996,11 +996,11 @@ traceroute_main(int argc, char *argv[])
        if(nprobes_str)
                nprobes = str2val(nprobes_str, "nprobes", 1, -1);
        if(source) {
-           /*
-            * set the ip source address of the outbound
-            * probe (e.g., on a multi-homed host).
-            */
-            if (getuid()) bb_error_msg_and_die("-s %s: Permission denied", source);
+               /*
+                * set the ip source address of the outbound
+                * probe (e.g., on a multi-homed host).
+                */
+               if (getuid()) bb_error_msg_and_die("-s %s: permission denied", source);
        }
        if(waittime_str)
                waittime = str2val(waittime_str, "wait time", 2, 24 * 60 * 60);
@@ -1015,7 +1015,7 @@ traceroute_main(int argc, char *argv[])
 
                for(l_sr = sourse_route_list; l_sr; ) {
                        if (lsrr >= NGATEWAYS)
-                               bb_error_msg_and_die("No more than %d gateways", NGATEWAYS);
+                               bb_error_msg_and_die("no more than %d gateways", NGATEWAYS);
                        getaddr(gwlist + lsrr, l_sr->data);
                        ++lsrr;
                        l_sr = l_sr->link;