summaryrefslogtreecommitdiff
path: root/networking/ping.c
diff options
context:
space:
mode:
authorDenis Vlasenko2006-12-31 12:14:16 +0000
committerDenis Vlasenko2006-12-31 12:14:16 +0000
commit806116b23407bdf95f22646f11f50b1d14e1cfc2 (patch)
tree5767bce96065ea8c3980a9dfa05dc769eb796d71 /networking/ping.c
parentd514ba226b5f3344c3e66395e78c5fb0a782d42a (diff)
downloadbusybox-806116b23407bdf95f22646f11f50b1d14e1cfc2.zip
busybox-806116b23407bdf95f22646f11f50b1d14e1cfc2.tar.gz
fixes from Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
Diffstat (limited to 'networking/ping.c')
-rw-r--r--networking/ping.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/networking/ping.c b/networking/ping.c
index 658c015..acbb8ec 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");