summaryrefslogtreecommitdiff
path: root/networking/ping6.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/ping6.c')
-rw-r--r--networking/ping6.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/networking/ping6.c b/networking/ping6.c
index 9f0509e..778dcd4 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");