safe_strtoXX interface proved to be a bit unconvenient.

Remove it, introduce saner bb_strtoXX.
Saved ~350 bytes.
This commit is contained in:
Denis Vlasenko
2006-11-27 14:43:21 +00:00
parent 8a0a83d503
commit d686a045c8
16 changed files with 145 additions and 280 deletions

View File

@@ -124,7 +124,8 @@ int ftp_receive(ftp_host_info_t *server, FILE *control_stream,
fd_data = xconnect_ftpdata(server, buf);
if (ftpcmd("SIZE ", server_path, control_stream, buf) == 213) {
if (SAFE_STRTOOFF(buf + 4, &filesize))
filesize = BB_STRTOOFF(buf + 4, NULL, 10);
if (errno || filesize < 0)
bb_error_msg_and_die("SIZE error: %s", buf + 4);
} else {
filesize = -1;