diff options
author | Rob Landley | 2005-08-12 06:08:41 +0000 |
---|---|---|
committer | Rob Landley | 2005-08-12 06:08:41 +0000 |
commit | 365a345e92c25c60c977aa1596e31a1e6b9cea80 (patch) | |
tree | 82780a220fc06e797ec923cbedd19e7730dbae4b | |
parent | d5138f44fe2e496498c62a06b7f50381edf952da (diff) | |
download | busybox-365a345e92c25c60c977aa1596e31a1e6b9cea80.zip busybox-365a345e92c25c60c977aa1596e31a1e6b9cea80.tar.gz |
Backport 10864 and 10999.
-rw-r--r-- | busybox/networking/inetd.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/busybox/networking/inetd.c b/busybox/networking/inetd.c index a1fa29c..c540a85 100644 --- a/busybox/networking/inetd.c +++ b/busybox/networking/inetd.c @@ -447,7 +447,7 @@ static char *LastArg; static void setproctitle(char *a, int s) { - size_t size; + socklen_t size; char *cp; struct sockaddr_in sn; char buf[80]; @@ -1021,7 +1021,7 @@ static void echo_dg(int s, servtab_t *sep) { char buffer[BUFSIZE]; int i; - size_t size; + socklen_t size; struct sockaddr sa; (void)sep; @@ -1092,10 +1092,10 @@ static void chargen_stream(int s, servtab_t *sep) text[LINESIZ + 1] = '\n'; for (rs = ring;;) { if ((len = endring - rs) >= LINESIZ) - memcpy(rs, text, LINESIZ); + memcpy(text, rs, LINESIZ); else { - memcpy(rs, text, len); - memcpy(ring, text + len, LINESIZ - len); + memcpy(text, rs, len); + memcpy(text + len, ring, LINESIZ - len); } if (++rs == endring) rs = ring; @@ -1110,7 +1110,8 @@ static void chargen_dg(int s, servtab_t *sep) { struct sockaddr sa; static char *rs; - size_t len, size; + size_t len; + socklen_t size; char text[LINESIZ+2]; (void)sep; @@ -1125,10 +1126,10 @@ static void chargen_dg(int s, servtab_t *sep) return; if ((len = endring - rs) >= LINESIZ) - memcpy(rs, text, LINESIZ); + memcpy(text, rs, LINESIZ); else { - memcpy(rs, text, len); - memcpy(ring, text + len, LINESIZ - len); + memcpy(text, rs, len); + memcpy(text + len, ring, LINESIZ - len); } if (++rs == endring) rs = ring; @@ -1172,7 +1173,7 @@ static void machtime_dg(int s, servtab_t *sep) { long result; struct sockaddr sa; - size_t size; + socklen_t size; (void)sep; size = sizeof(sa); @@ -1208,7 +1209,7 @@ static void daytime_dg(int s, servtab_t *sep) { char buffer[256]; struct sockaddr sa; - size_t size; + socklen_t size; (void)sep; |