libbb: make trim() return pointer to terminating NUL
function old new delta trim 80 90 +10 angle_address 56 50 -6 sysctl_main 282 273 -9 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/3 up/down: +10/-15) Total: -5 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@@ -37,9 +37,8 @@ static char *get_line(const char *filename, char *buf, unsigned *bufsize_p)
|
||||
if (sz < 0)
|
||||
sz = 0;
|
||||
buf[sz] = '\0';
|
||||
trim(buf);
|
||||
|
||||
sz = strlen(buf) + 1;
|
||||
sz = (trim(buf) - buf) + 1;
|
||||
bufsize -= sz;
|
||||
buf += sz;
|
||||
buf[0] = '\0';
|
||||
|
Reference in New Issue
Block a user