diff options
author | Denis Vlasenko | 2008-02-16 13:18:17 +0000 |
---|---|---|
committer | Denis Vlasenko | 2008-02-16 13:18:17 +0000 |
commit | 284d0faed6a1ec2adcc4b7aea31ae3d05b3b70d9 (patch) | |
tree | 3cfcea06c5a5c9e454edd39b58111ef38810882c /networking | |
parent | 069e347863fa46f684ab6bd7e48cefd8fa74b629 (diff) | |
download | busybox-284d0faed6a1ec2adcc4b7aea31ae3d05b3b70d9.zip busybox-284d0faed6a1ec2adcc4b7aea31ae3d05b3b70d9.tar.gz |
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 de11f91..91f6fcd 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) static int xconnect_ftpdata(ftp_host_info_t *server, char *buf) { char *buf_ptr; - unsigned short port_num; + unsigned port_num; /* Response is "NNN garbageN1,N2,N3,N4,P1,P2[)garbage] * Server's IP is N1.N2.N3.N4 (we ignore it) diff --git a/networking/httpd.c b/networking/httpd.c index 779f070..1ac49e7 100644 --- a/networking/httpd.c +++ b/networking/httpd.c @@ -1409,10 +1409,11 @@ static void send_cgi_and_exit( /* Child process */ xfunc_error_retval = 242; + /* NB: close _first_, then move fds! */ + close(toCgi.wr); + close(fromCgi.rd); xmove_fd(toCgi.rd, 0); /* replace stdin with the pipe */ xmove_fd(fromCgi.wr, 1); /* replace stdout with the pipe */ - close(fromCgi.rd); - close(toCgi.wr); /* User seeing stderr output can be a security problem. * If CGI really wants that, it can always do dup itself. */ /* dup2(1, 2); */ diff --git a/networking/libiproute/ll_proto.c b/networking/libiproute/ll_proto.c index 6933ce2..62262c9 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) id = ntohs(id); - for (i=0; i < ARRAY_SIZE(llproto_names); i++) { + for (i = 0; i < ARRAY_SIZE(llproto_names); i++) { if (llproto_names[i].id == id) return llproto_names[i].name; } @@ -113,7 +113,7 @@ const char *ll_proto_n2a(unsigned short id, char *buf, int len) int ll_proto_a2n(unsigned short *id, char *buf) { int i; - for (i=0; i < ARRAY_SIZE(llproto_names); i++) { + for (i = 0; i < ARRAY_SIZE(llproto_names); i++) { if (strcasecmp(llproto_names[i].name, buf) == 0) { *id = htons(llproto_names[i].id); return 0; diff --git a/networking/libiproute/utils.h b/networking/libiproute/utils.h index cd65049..50a6c20 100644 --- a/networking/libiproute/utils.h +++ b/networking/libiproute/utils.h @@ -42,8 +42,8 @@ typedef struct #endif struct dn_naddr { - unsigned short a_len; - unsigned char a_addr[DN_MAXADDL]; + unsigned short a_len; + unsigned char a_addr[DN_MAXADDL]; }; #define IPX_NODE_LEN 6 |