Commit aa07ca5793414ce257ad98809147bd1dbb7a3837

Authored by Harald Welte
Committed by David S. Miller
1 parent 506e7beb74

[NETFILTER] remove bogus hand-coded htonll() from nenetlink_queue

htonll() is nothing else than cpu_to_be64(), so we'd rather call the
latter.

Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 1 changed file with 2 additions and 13 deletions Side-by-side Diff

net/netfilter/nfnetlink_queue.c
... ... @@ -76,17 +76,6 @@
76 76  
77 77 static DEFINE_RWLOCK(instances_lock);
78 78  
79   -static u_int64_t htonll(u_int64_t in)
80   -{
81   - u_int64_t out;
82   - int i;
83   -
84   - for (i = 0; i < sizeof(u_int64_t); i++)
85   - ((u_int8_t *)&out)[sizeof(u_int64_t)-1] = ((u_int8_t *)&in)[i];
86   -
87   - return out;
88   -}
89   -
90 79 #define INSTANCE_BUCKETS 16
91 80 static struct hlist_head instance_table[INSTANCE_BUCKETS];
92 81  
... ... @@ -497,8 +486,8 @@
497 486 if (entry->skb->tstamp.off_sec) {
498 487 struct nfqnl_msg_packet_timestamp ts;
499 488  
500   - ts.sec = htonll(skb_tv_base.tv_sec + entry->skb->tstamp.off_sec);
501   - ts.usec = htonll(skb_tv_base.tv_usec + entry->skb->tstamp.off_usec);
  489 + ts.sec = cpu_to_be64(skb_tv_base.tv_sec + entry->skb->tstamp.off_sec);
  490 + ts.usec = cpu_to_be64(skb_tv_base.tv_usec + entry->skb->tstamp.off_usec);
502 491  
503 492 NFA_PUT(skb, NFQA_TIMESTAMP, sizeof(ts), &ts);
504 493 }