*: move get_sock_lsa and xwrite_str to libbb, use where appropriate
function old new delta get_sock_lsa - 72 +72 buffer_fill_and_print 179 196 +17 parse_expr 824 832 +8 read_base64 343 348 +5 nameval 202 206 +4 fbset_main 1694 1698 +4 expand 1849 1853 +4 udhcp_send_kernel_packet 249 252 +3 udhcp_get_option 223 222 -1 chat_main 1246 1245 -1 pack_gzip 1661 1659 -2 doset 299 297 -2 bb__parsespent 119 117 -2 test_main 260 257 -3 qgravechar 109 106 -3 tcpudpsvd_main 1834 1830 -4 sysctl_display_all 589 580 -9 xopen_xwrite_close 44 33 -11 prs 30 18 -12 find_main 418 406 -12 full_write2_str 25 12 -13 adduser_main 667 654 -13 evaltreenr 817 802 -15 evaltree 817 802 -15 tftpd_main 526 493 -33 ftpd_main 2050 1990 -60 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 7/18 up/down: 117/-211) Total: -94 bytes
This commit is contained in:
@@ -743,7 +743,7 @@ static void print_tree(struct op *head)
|
||||
static void prs(const char *s)
|
||||
{
|
||||
if (*s)
|
||||
write(STDERR_FILENO, s, strlen(s));
|
||||
xwrite_str(STDERR_FILENO, s);
|
||||
}
|
||||
|
||||
static void prn(unsigned u)
|
||||
@@ -3600,7 +3600,7 @@ static int doset(struct op *t UNUSED_PARAM, char **args)
|
||||
cp = args[1];
|
||||
if (cp == NULL) {
|
||||
for (vp = vlist; vp; vp = vp->next)
|
||||
varput(vp->name, 1);
|
||||
varput(vp->name, STDOUT_FILENO);
|
||||
return 0;
|
||||
}
|
||||
if (*cp == '-') {
|
||||
@@ -3639,8 +3639,8 @@ static int doset(struct op *t UNUSED_PARAM, char **args)
|
||||
static void varput(char *s, int out)
|
||||
{
|
||||
if (isalnum(*s) || *s == '_') {
|
||||
write(out, s, strlen(s));
|
||||
write(out, "\n", 1);
|
||||
xwrite_str(out, s);
|
||||
xwrite(out, "\n", 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user