summaryrefslogtreecommitdiffhomepage
path: root/networking/ping6.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-01-03 22:14:18 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-01-03 22:14:18 +0000
commit919c10dd8884aa4876ec6ca407a12f3793f2bab1 (patch)
tree54d17a4ecceace5a12e0823204a46a9396db756d /networking/ping6.c
parentb36b370fbec946290e5b3d149d4d14a0db458cfa (diff)
ping[6]: don't do htons(a++), it can be a macro
Diffstat (limited to 'networking/ping6.c')
-rw-r--r--networking/ping6.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/networking/ping6.c b/networking/ping6.c
index 778dcd4f5..c0b31c752 100644
--- a/networking/ping6.c
+++ b/networking/ping6.c
@@ -206,9 +206,10 @@ static void sendping(int junk)
pkt->icmp6_type = ICMP6_ECHO_REQUEST;
pkt->icmp6_code = 0;
pkt->icmp6_cksum = 0;
- pkt->icmp6_seq = htons(ntransmitted++);
+ pkt->icmp6_seq = htons(ntransmitted); /* don't ++ here, it can be a macro */
pkt->icmp6_id = myid;
CLR(pkt->icmp6_seq % MAX_DUP_CHK);
+ ntransmitted++;
gettimeofday((struct timeval *) &pkt->icmp6_data8[4], NULL);