diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-12-31 12:14:16 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-12-31 12:14:16 +0000 |
commit | 806116b23407bdf95f22646f11f50b1d14e1cfc2 (patch) | |
tree | 5767bce96065ea8c3980a9dfa05dc769eb796d71 | |
parent | d514ba226b5f3344c3e66395e78c5fb0a782d42a (diff) | |
download | busybox-806116b23407bdf95f22646f11f50b1d14e1cfc2.tar.gz |
fixes from Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
-rw-r--r-- | miscutils/less.c | 2 | ||||
-rw-r--r-- | networking/ping.c | 5 | ||||
-rw-r--r-- | networking/ping6.c | 7 |
3 files changed, 8 insertions, 6 deletions
diff --git a/miscutils/less.c b/miscutils/less.c index 807a5bf47..916213082 100644 --- a/miscutils/less.c +++ b/miscutils/less.c @@ -415,7 +415,7 @@ static void print_ascii(const char *str) n = strcspn(str, controls); if (n) { if (!str[n]) break; - printf("%.*s", n, str); + printf("%.*s", (int) n, str); str += n; } n = strspn(str, controls); diff --git a/networking/ping.c b/networking/ping.c index 658c01518..acbb8ec6f 100644 --- a/networking/ping.c +++ b/networking/ping.c @@ -117,8 +117,9 @@ static void ping(const char *host) struct sockaddr_in from; socklen_t fromlen = sizeof(from); - if ((c = recvfrom(pingsock, packet, sizeof(packet), 0, - (struct sockaddr *) &from, &fromlen)) < 0) { + c = recvfrom(pingsock, packet, sizeof(packet), 0, + (struct sockaddr *) &from, &fromlen); + if (c < 0) { if (errno == EINTR) continue; bb_perror_msg("recvfrom"); diff --git a/networking/ping6.c b/networking/ping6.c index 9f0509e66..778dcd4f5 100644 --- a/networking/ping6.c +++ b/networking/ping6.c @@ -104,10 +104,11 @@ static void ping(const char *host) /* listen for replies */ while (1) { struct sockaddr_in6 from; - size_t fromlen = sizeof(from); + socklen_t fromlen = sizeof(from); - if ((c = recvfrom(pingsock, packet, sizeof(packet), 0, - (struct sockaddr *) &from, &fromlen)) < 0) { + c = recvfrom(pingsock, packet, sizeof(packet), 0, + (struct sockaddr *) &from, &fromlen); + if (c < 0) { if (errno == EINTR) continue; bb_perror_msg("recvfrom"); |