libbb: new function bb_die_memory_exhausted
function old new delta bb_die_memory_exhausted - 10 +10 xstrdup 28 23 -5 xsetenv 27 22 -5 xrealloc 32 27 -5 xputenv 22 17 -5 xmalloc 30 25 -5 xfdopen_helper 40 35 -5 xasprintf 44 39 -5 wget_main 2387 2382 -5 open_socket 54 49 -5 glob_brace 419 414 -5 bb_get_chunk_from_file 146 141 -5 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/11 up/down: 10/-55) Total: -45 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@@ -409,7 +409,7 @@ static FILE *open_socket(len_and_sockaddr *lsa)
|
||||
/* hopefully it understands what ESPIPE means... */
|
||||
fp = fdopen(fd, "r+");
|
||||
if (!fp)
|
||||
bb_perror_msg_and_die(bb_msg_memory_exhausted);
|
||||
bb_die_memory_exhausted();
|
||||
|
||||
return fp;
|
||||
}
|
||||
@@ -1114,7 +1114,7 @@ static void download_one_url(const char *url)
|
||||
# endif
|
||||
sfp = fdopen(fd, "r+");
|
||||
if (!sfp)
|
||||
bb_perror_msg_and_die(bb_msg_memory_exhausted);
|
||||
bb_die_memory_exhausted();
|
||||
goto socket_opened;
|
||||
}
|
||||
sfp = open_socket(lsa);
|
||||
|
Reference in New Issue
Block a user