char al[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
"0123456789+/";
- char *s = buf;
+ char *s = buf;
while(*p) {
- if (s >= buf+len-4)
- bb_error_msg_and_die("buffer overflow");
+ if (s >= buf+len-4)
+ bb_error_msg_and_die("buffer overflow");
*(s++) = al[(*p >> 2) & 0x3F];
*(s++) = al[((*p << 4) & 0x30) | ((*(p+1) >> 4) & 0x0F)];
*s = *(s+1) = '=';
*(s++) = al[*(p++) & 0x3F];
}
- return buf;
+ return buf;
}
#endif
{ "quiet", 0, NULL, 'q' },
{ "passive-ftp", 0, NULL, 139 },
{ "output-document", 1, NULL, 'O' },
- { "header", 1, NULL, 131 },
+ { "header", 1, NULL, 131 },
{ "directory-prefix",1, NULL, 'P' },
{ "proxy", 1, NULL, 'Y' },
{ 0, 0, 0, 0 }
close_delete_and_die("no response from server");
for (s = buf ; *s != '\0' && !isspace(*s) ; ++s)
- ;
+ ;
for ( ; isspace(*s) ; ++s)
- ;
+ ;
switch (status = atoi(s)) {
case 0:
case 100:
if (strcasecmp(s, "chunked") == 0) {
chunked = got_clen = 1;
} else {
- close_delete_and_die("server wants to do %s transfer encoding", s);
+ close_delete_and_die("server wants to do %s transfer encoding", s);
}
}
if (strcasecmp(buf, "location") == 0) {
if (ftpcmd("RETR /", target.path, sfp, buf) > 150)
close_delete_and_die("RETR: %s", buf+4);
-
}