diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-02-16 13:18:17 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-02-16 13:18:17 +0000 |
commit | 284d0faed6a1ec2adcc4b7aea31ae3d05b3b70d9 (patch) | |
tree | 3cfcea06c5a5c9e454edd39b58111ef38810882c /networking | |
parent | 069e347863fa46f684ab6bd7e48cefd8fa74b629 (diff) | |
download | busybox-w32-284d0faed6a1ec2adcc4b7aea31ae3d05b3b70d9.tar.gz busybox-w32-284d0faed6a1ec2adcc4b7aea31ae3d05b3b70d9.tar.bz2 busybox-w32-284d0faed6a1ec2adcc4b7aea31ae3d05b3b70d9.zip |
random s/short/int/
add_cmd 1189 1190 +1
xconnect_ftpdata 118 117 -1
data_align 86 84 -2
process_files 2101 2096 -5
forkexec 1345 1334 -11
Diffstat (limited to 'networking')
-rw-r--r-- | networking/ftpgetput.c | 2 | ||||
-rw-r--r-- | networking/httpd.c | 5 | ||||
-rw-r--r-- | networking/libiproute/ll_proto.c | 4 | ||||
-rw-r--r-- | networking/libiproute/utils.h | 4 |
4 files changed, 8 insertions, 7 deletions
diff --git a/networking/ftpgetput.c b/networking/ftpgetput.c index de11f912e..91f6fcd0d 100644 --- a/networking/ftpgetput.c +++ b/networking/ftpgetput.c | |||
@@ -72,7 +72,7 @@ static int ftpcmd(const char *s1, const char *s2, FILE *stream, char *buf) | |||
72 | static int xconnect_ftpdata(ftp_host_info_t *server, char *buf) | 72 | static int xconnect_ftpdata(ftp_host_info_t *server, char *buf) |
73 | { | 73 | { |
74 | char *buf_ptr; | 74 | char *buf_ptr; |
75 | unsigned short port_num; | 75 | unsigned port_num; |
76 | 76 | ||
77 | /* Response is "NNN garbageN1,N2,N3,N4,P1,P2[)garbage] | 77 | /* Response is "NNN garbageN1,N2,N3,N4,P1,P2[)garbage] |
78 | * Server's IP is N1.N2.N3.N4 (we ignore it) | 78 | * Server's IP is N1.N2.N3.N4 (we ignore it) |
diff --git a/networking/httpd.c b/networking/httpd.c index 779f070d9..1ac49e7a2 100644 --- a/networking/httpd.c +++ b/networking/httpd.c | |||
@@ -1409,10 +1409,11 @@ static void send_cgi_and_exit( | |||
1409 | /* Child process */ | 1409 | /* Child process */ |
1410 | xfunc_error_retval = 242; | 1410 | xfunc_error_retval = 242; |
1411 | 1411 | ||
1412 | /* NB: close _first_, then move fds! */ | ||
1413 | close(toCgi.wr); | ||
1414 | close(fromCgi.rd); | ||
1412 | xmove_fd(toCgi.rd, 0); /* replace stdin with the pipe */ | 1415 | xmove_fd(toCgi.rd, 0); /* replace stdin with the pipe */ |
1413 | xmove_fd(fromCgi.wr, 1); /* replace stdout with the pipe */ | 1416 | xmove_fd(fromCgi.wr, 1); /* replace stdout with the pipe */ |
1414 | close(fromCgi.rd); | ||
1415 | close(toCgi.wr); | ||
1416 | /* User seeing stderr output can be a security problem. | 1417 | /* User seeing stderr output can be a security problem. |
1417 | * If CGI really wants that, it can always do dup itself. */ | 1418 | * If CGI really wants that, it can always do dup itself. */ |
1418 | /* dup2(1, 2); */ | 1419 | /* dup2(1, 2); */ |
diff --git a/networking/libiproute/ll_proto.c b/networking/libiproute/ll_proto.c index 6933ce239..62262c9c2 100644 --- a/networking/libiproute/ll_proto.c +++ b/networking/libiproute/ll_proto.c | |||
@@ -102,7 +102,7 @@ const char *ll_proto_n2a(unsigned short id, char *buf, int len) | |||
102 | 102 | ||
103 | id = ntohs(id); | 103 | id = ntohs(id); |
104 | 104 | ||
105 | for (i=0; i < ARRAY_SIZE(llproto_names); i++) { | 105 | for (i = 0; i < ARRAY_SIZE(llproto_names); i++) { |
106 | if (llproto_names[i].id == id) | 106 | if (llproto_names[i].id == id) |
107 | return llproto_names[i].name; | 107 | return llproto_names[i].name; |
108 | } | 108 | } |
@@ -113,7 +113,7 @@ const char *ll_proto_n2a(unsigned short id, char *buf, int len) | |||
113 | int ll_proto_a2n(unsigned short *id, char *buf) | 113 | int ll_proto_a2n(unsigned short *id, char *buf) |
114 | { | 114 | { |
115 | int i; | 115 | int i; |
116 | for (i=0; i < ARRAY_SIZE(llproto_names); i++) { | 116 | for (i = 0; i < ARRAY_SIZE(llproto_names); i++) { |
117 | if (strcasecmp(llproto_names[i].name, buf) == 0) { | 117 | if (strcasecmp(llproto_names[i].name, buf) == 0) { |
118 | *id = htons(llproto_names[i].id); | 118 | *id = htons(llproto_names[i].id); |
119 | return 0; | 119 | return 0; |
diff --git a/networking/libiproute/utils.h b/networking/libiproute/utils.h index cd650492d..50a6c2026 100644 --- a/networking/libiproute/utils.h +++ b/networking/libiproute/utils.h | |||
@@ -42,8 +42,8 @@ typedef struct | |||
42 | #endif | 42 | #endif |
43 | 43 | ||
44 | struct dn_naddr { | 44 | struct dn_naddr { |
45 | unsigned short a_len; | 45 | unsigned short a_len; |
46 | unsigned char a_addr[DN_MAXADDL]; | 46 | unsigned char a_addr[DN_MAXADDL]; |
47 | }; | 47 | }; |
48 | 48 | ||
49 | #define IPX_NODE_LEN 6 | 49 | #define IPX_NODE_LEN 6 |