diff options
author | Harald Welte <laforge@netfilter.org> | 2005-09-05 21:09:08 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-09-05 21:09:08 -0400 |
commit | aa07ca5793414ce257ad98809147bd1dbb7a3837 (patch) | |
tree | 72e04abe87550842c4c4a3d60b633d1dbce131de | |
parent | 506e7beb7468c7cf56370d0a7a6afbec56653473 (diff) |
[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>
-rw-r--r-- | net/netfilter/nfnetlink_queue.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c index 052fc97dae98..249bddb28acd 100644 --- a/net/netfilter/nfnetlink_queue.c +++ b/net/netfilter/nfnetlink_queue.c | |||
@@ -76,17 +76,6 @@ typedef int (*nfqnl_cmpfn)(struct nfqnl_queue_entry *, unsigned long); | |||
76 | 76 | ||
77 | static DEFINE_RWLOCK(instances_lock); | 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 | #define INSTANCE_BUCKETS 16 | 79 | #define INSTANCE_BUCKETS 16 |
91 | static struct hlist_head instance_table[INSTANCE_BUCKETS]; | 80 | static struct hlist_head instance_table[INSTANCE_BUCKETS]; |
92 | 81 | ||
@@ -497,8 +486,8 @@ nfqnl_build_packet_message(struct nfqnl_instance *queue, | |||
497 | if (entry->skb->tstamp.off_sec) { | 486 | if (entry->skb->tstamp.off_sec) { |
498 | struct nfqnl_msg_packet_timestamp ts; | 487 | struct nfqnl_msg_packet_timestamp ts; |
499 | 488 | ||
500 | ts.sec = htonll(skb_tv_base.tv_sec + entry->skb->tstamp.off_sec); | 489 | ts.sec = cpu_to_be64(skb_tv_base.tv_sec + entry->skb->tstamp.off_sec); |
501 | ts.usec = htonll(skb_tv_base.tv_usec + entry->skb->tstamp.off_usec); | 490 | ts.usec = cpu_to_be64(skb_tv_base.tv_usec + entry->skb->tstamp.off_usec); |
502 | 491 | ||
503 | NFA_PUT(skb, NFQA_TIMESTAMP, sizeof(ts), &ts); | 492 | NFA_PUT(skb, NFQA_TIMESTAMP, sizeof(ts), &ts); |
504 | } | 493 | } |