diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2009-03-09 00:12:37 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2009-03-09 00:12:37 +0000 |
commit | 73c571a5fff95d0f50f4fc509c35fedca73122bc (patch) | |
tree | 8e3be82bbd3f7307b57f146fa2ef8ea422391137 /networking/ftpd.c | |
parent | 5e4fda0affaa0a80a5ff33dd72c702b8f905be33 (diff) | |
download | busybox-w32-73c571a5fff95d0f50f4fc509c35fedca73122bc.tar.gz busybox-w32-73c571a5fff95d0f50f4fc509c35fedca73122bc.tar.bz2 busybox-w32-73c571a5fff95d0f50f4fc509c35fedca73122bc.zip |
*: 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
Diffstat (limited to 'networking/ftpd.c')
-rw-r--r-- | networking/ftpd.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/networking/ftpd.c b/networking/ftpd.c index 91cbc17f4..6289edf0c 100644 --- a/networking/ftpd.c +++ b/networking/ftpd.c | |||
@@ -107,14 +107,6 @@ struct globals { | |||
107 | #define G (*(struct globals*)&bb_common_bufsiz1) | 107 | #define G (*(struct globals*)&bb_common_bufsiz1) |
108 | #define INIT_G() do { } while (0) | 108 | #define INIT_G() do { } while (0) |
109 | 109 | ||
110 | |||
111 | // libbb candidate? | ||
112 | static void | ||
113 | xwrite_str(int fd, const char *str) | ||
114 | { | ||
115 | xwrite(fd, str, strlen(str)); | ||
116 | } | ||
117 | |||
118 | static char * | 110 | static char * |
119 | replace_text(const char *str, const char from, const char *to) | 111 | replace_text(const char *str, const char from, const char *to) |
120 | { | 112 | { |
@@ -918,20 +910,6 @@ handle_stou(void) | |||
918 | } | 910 | } |
919 | #endif /* ENABLE_FEATURE_FTP_WRITE */ | 911 | #endif /* ENABLE_FEATURE_FTP_WRITE */ |
920 | 912 | ||
921 | /* TODO: libbb candidate (tftp has another copy) */ | ||
922 | static len_and_sockaddr *get_sock_lsa(int s) | ||
923 | { | ||
924 | len_and_sockaddr *lsa; | ||
925 | socklen_t len = 0; | ||
926 | |||
927 | if (getsockname(s, NULL, &len) != 0) | ||
928 | return NULL; | ||
929 | lsa = xzalloc(LSA_LEN_SIZE + len); | ||
930 | lsa->len = len; | ||
931 | getsockname(s, &lsa->u.sa, &lsa->len); | ||
932 | return lsa; | ||
933 | } | ||
934 | |||
935 | int ftpd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 913 | int ftpd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
936 | int ftpd_main(int argc UNUSED_PARAM, char **argv) | 914 | int ftpd_main(int argc UNUSED_PARAM, char **argv) |
937 | { | 915 | { |