aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2006-06-13 16:44:26 +0000
committerRob Landley <rob@landley.net>2006-06-13 16:44:26 +0000
commit76ef08c5e3349accfe6f10a97def7c7f7e85c0ad (patch)
treeb85c3ca6d12bd7d4a3bc26b48f39784f35b18e06
parent7900b7b9b9956661d536223226c462c7f48fa40a (diff)
downloadbusybox-w32-76ef08c5e3349accfe6f10a97def7c7f7e85c0ad.tar.gz
busybox-w32-76ef08c5e3349accfe6f10a97def7c7f7e85c0ad.tar.bz2
busybox-w32-76ef08c5e3349accfe6f10a97def7c7f7e85c0ad.zip
Whitespace cleanup from Denis Vlasenko.
-rw-r--r--networking/wget.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/networking/wget.c b/networking/wget.c
index 4b5b3192d..506d329ca 100644
--- a/networking/wget.c
+++ b/networking/wget.c
@@ -120,11 +120,11 @@ static char *base64enc(unsigned char *p, char *buf, int len) {
120 120
121 char al[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" 121 char al[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
122 "0123456789+/"; 122 "0123456789+/";
123 char *s = buf; 123 char *s = buf;
124 124
125 while(*p) { 125 while(*p) {
126 if (s >= buf+len-4) 126 if (s >= buf+len-4)
127 bb_error_msg_and_die("buffer overflow"); 127 bb_error_msg_and_die("buffer overflow");
128 *(s++) = al[(*p >> 2) & 0x3F]; 128 *(s++) = al[(*p >> 2) & 0x3F];
129 *(s++) = al[((*p << 4) & 0x30) | ((*(p+1) >> 4) & 0x0F)]; 129 *(s++) = al[((*p << 4) & 0x30) | ((*(p+1) >> 4) & 0x0F)];
130 *s = *(s+1) = '='; 130 *s = *(s+1) = '=';
@@ -135,7 +135,7 @@ static char *base64enc(unsigned char *p, char *buf, int len) {
135 *(s++) = al[*(p++) & 0x3F]; 135 *(s++) = al[*(p++) & 0x3F];
136 } 136 }
137 137
138 return buf; 138 return buf;
139} 139}
140#endif 140#endif
141 141
@@ -153,7 +153,7 @@ static const struct option wget_long_options[] = {
153 { "quiet", 0, NULL, 'q' }, 153 { "quiet", 0, NULL, 'q' },
154 { "passive-ftp", 0, NULL, 139 }, 154 { "passive-ftp", 0, NULL, 139 },
155 { "output-document", 1, NULL, 'O' }, 155 { "output-document", 1, NULL, 'O' },
156 { "header", 1, NULL, 131 }, 156 { "header", 1, NULL, 131 },
157 { "directory-prefix",1, NULL, 'P' }, 157 { "directory-prefix",1, NULL, 'P' },
158 { "proxy", 1, NULL, 'Y' }, 158 { "proxy", 1, NULL, 'Y' },
159 { 0, 0, 0, 0 } 159 { 0, 0, 0, 0 }
@@ -358,9 +358,9 @@ read_response:
358 close_delete_and_die("no response from server"); 358 close_delete_and_die("no response from server");
359 359
360 for (s = buf ; *s != '\0' && !isspace(*s) ; ++s) 360 for (s = buf ; *s != '\0' && !isspace(*s) ; ++s)
361 ; 361 ;
362 for ( ; isspace(*s) ; ++s) 362 for ( ; isspace(*s) ; ++s)
363 ; 363 ;
364 switch (status = atoi(s)) { 364 switch (status = atoi(s)) {
365 case 0: 365 case 0:
366 case 100: 366 case 100:
@@ -402,7 +402,7 @@ read_response:
402 if (strcasecmp(s, "chunked") == 0) { 402 if (strcasecmp(s, "chunked") == 0) {
403 chunked = got_clen = 1; 403 chunked = got_clen = 1;
404 } else { 404 } else {
405 close_delete_and_die("server wants to do %s transfer encoding", s); 405 close_delete_and_die("server wants to do %s transfer encoding", s);
406 } 406 }
407 } 407 }
408 if (strcasecmp(buf, "location") == 0) { 408 if (strcasecmp(buf, "location") == 0) {
@@ -494,7 +494,6 @@ read_response:
494 494
495 if (ftpcmd("RETR /", target.path, sfp, buf) > 150) 495 if (ftpcmd("RETR /", target.path, sfp, buf) > 150)
496 close_delete_and_die("RETR: %s", buf+4); 496 close_delete_and_die("RETR: %s", buf+4);
497
498 } 497 }
499 498
500 499