aboutsummaryrefslogtreecommitdiff
path: root/networking/ping.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-09-02 16:57:59 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-09-02 16:57:59 +0000
commite0b7f71d26d224bd8304d9dfcac3fe9b9d862cd2 (patch)
tree682ff0c7ef630f2e115b6fbe35d4fed561d06cc5 /networking/ping.c
parent2cbe6e6eb237a8f51139be4d450997a0317ec593 (diff)
downloadbusybox-e0b7f71d26d224bd8304d9dfcac3fe9b9d862cd2.tar.gz
ping(6): use htons instead of SWAP_BE.
Diffstat (limited to 'networking/ping.c')
-rw-r--r--networking/ping.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/networking/ping.c b/networking/ping.c
index 18fb926ad..4269eaa6f 100644
--- a/networking/ping.c
+++ b/networking/ping.c
@@ -209,7 +209,7 @@ static void sendping(int junk)
pkt->icmp_type = ICMP_ECHO;
pkt->icmp_code = 0;
pkt->icmp_cksum = 0;
- pkt->icmp_seq = SWAP_BE16(ntransmitted++);
+ pkt->icmp_seq = htons(ntransmitted++);
pkt->icmp_id = myid;
CLR(ntohs(pkt->icmp_seq) % MAX_DUP_CHK);
@@ -235,7 +235,7 @@ static void sendping(int junk)
}
}
-static char *icmp_type_name (int id)
+static char *icmp_type_name(int id)
{
switch (id) {
case ICMP_ECHOREPLY: return "Echo Reply";
@@ -318,7 +318,7 @@ static void unpack(char *buf, int sz, struct sockaddr_in *from)
} else
if (icmppkt->icmp_type != ICMP_ECHO)
bb_error_msg("Warning: Got ICMP %d (%s)",
- icmppkt->icmp_type, icmp_type_name (icmppkt->icmp_type));
+ icmppkt->icmp_type, icmp_type_name(icmppkt->icmp_type));
fflush(stdout);
}