diff options
author | Ron Yorston | 2021-01-23 13:22:33 +0000 |
---|---|---|
committer | Denys Vlasenko | 2021-02-03 20:43:07 +0100 |
commit | 6ad38d66d08a2646c6423b967a790656ae026c95 (patch) | |
tree | a8866dbecafeb1679135008d7e52f245adb0e8e7 /coreutils/install.c | |
parent | c849e72c0b216578f96b763529c5e58056d0662c (diff) | |
download | busybox-6ad38d66d08a2646c6423b967a790656ae026c95.zip busybox-6ad38d66d08a2646c6423b967a790656ae026c95.tar.gz |
libbb: code shrink fgets_str
Use a NULL value of maxsz_p to indicate to xmalloc_fgets_internal()
that the caller doesn't care about the maximum size of the buffer.
This allows the default maximum size to be set once in
xmalloc_fgets_internal() instead of separately in each caller.
function old new delta
xmalloc_fgets_internal 273 287 +14
xmalloc_fgets_str 30 9 -21
xmalloc_fgetline_str 33 12 -21
xmalloc_fgets_str_len 38 10 -28
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/3 up/down: 14/-70) Total: -56 bytes
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils/install.c')
0 files changed, 0 insertions, 0 deletions