aboutsummaryrefslogtreecommitdiff
path: root/networking/wget.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-10-08 12:49:22 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-10-08 12:49:22 +0000
commit1385899416a4396385ad421ae1f532be7103738a (patch)
treefc4d14a910593d1235318bb36abe5e9f72d2039e /networking/wget.c
parent5625415085e68ac5e150f54e685417c866620d76 (diff)
downloadbusybox-w32-1385899416a4396385ad421ae1f532be7103738a.tar.gz
busybox-w32-1385899416a4396385ad421ae1f532be7103738a.tar.bz2
busybox-w32-1385899416a4396385ad421ae1f532be7103738a.zip
attempt to regularize atoi mess.
Diffstat (limited to 'networking/wget.c')
-rw-r--r--networking/wget.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/networking/wget.c b/networking/wget.c
index eda0bb87c..e7b19f2ef 100644
--- a/networking/wget.c
+++ b/networking/wget.c
@@ -297,7 +297,7 @@ read_response:
297 s = buf; 297 s = buf;
298 while (*s != '\0' && !isspace(*s)) ++s; 298 while (*s != '\0' && !isspace(*s)) ++s;
299 while (isspace(*s)) ++s; 299 while (isspace(*s)) ++s;
300 switch (status = atoi(s)) { 300 switch (status = xatoi(s)) {
301 case 0: 301 case 0:
302 case 100: 302 case 100:
303 while (gethdr(buf, sizeof(buf), sfp, &n) != NULL) 303 while (gethdr(buf, sizeof(buf), sfp, &n) != NULL)
@@ -406,9 +406,9 @@ read_response:
406 bb_error_msg_and_die("PASV: %s", buf+4); 406 bb_error_msg_and_die("PASV: %s", buf+4);
407 s = strrchr(buf, ','); 407 s = strrchr(buf, ',');
408 *s = 0; 408 *s = 0;
409 port = atoi(s+1); 409 port = xatol_range(s+1, 0, 255);
410 s = strrchr(buf, ','); 410 s = strrchr(buf, ',');
411 port += atoi(s+1) * 256; 411 port += xatol_range(s+1, 0, 255) * 256;
412 s_in.sin_port = htons(port); 412 s_in.sin_port = htons(port);
413 dfp = open_socket(&s_in); 413 dfp = open_socket(&s_in);
414 414
@@ -562,7 +562,7 @@ static void parse_url(char *src_url, struct host_info *h)
562 cp = strchr(pp, ':'); 562 cp = strchr(pp, ':');
563 if (cp != NULL) { 563 if (cp != NULL) {
564 *cp++ = '\0'; 564 *cp++ = '\0';
565 h->port = htons(atoi(cp)); 565 h->port = htons(xatou16(cp));
566 } 566 }
567} 567}
568 568
@@ -646,7 +646,7 @@ static int ftpcmd(char *s1, char *s2, FILE *fp, char *buf)
646 } 646 }
647 } while (!isdigit(buf[0]) || buf[3] != ' '); 647 } while (!isdigit(buf[0]) || buf[3] != ' ');
648 648
649 return atoi(buf); 649 return xatoi(buf);
650} 650}
651 651
652#ifdef CONFIG_FEATURE_WGET_STATUSBAR 652#ifdef CONFIG_FEATURE_WGET_STATUSBAR