summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFelix Janda <felix.janda@posteo.de>2015-05-16 11:38:53 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2015-05-21 14:46:53 +0200
commit1c637fe7ea8a70a77273366d24e221b0d3d64702 (patch)
tree90234930e4bf139b35d76899376c0bafff511e13 /include
parent3c1b1e54a46ad31e6ee7e5d87eed84bd29d8f460 (diff)
src: Use stdint types
Signed-off-by: Felix Janda <felix.janda@posteo.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r--include/bitops.h14
-rw-r--r--include/helper.h2
2 files changed, 8 insertions, 8 deletions
diff --git a/include/bitops.h b/include/bitops.h
index 51f4289..27fe58d 100644
--- a/include/bitops.h
+++ b/include/bitops.h
@@ -1,34 +1,34 @@
#ifndef _BITOPS_H_
#define _BITOPS_H_
-#include <stdlib.h>
+#include <stdint.h>
-static inline void set_bit_u32(int nr, u_int32_t *addr)
+static inline void set_bit_u32(int nr, uint32_t *addr)
{
addr[nr >> 5] |= (1UL << (nr & 31));
}
-static inline void unset_bit_u32(int nr, u_int32_t *addr)
+static inline void unset_bit_u32(int nr, uint32_t *addr)
{
addr[nr >> 5] &= ~(1UL << (nr & 31));
}
-static inline int test_bit_u32(int nr, const u_int32_t *addr)
+static inline int test_bit_u32(int nr, const uint32_t *addr)
{
return ((1UL << (nr & 31)) & (addr[nr >> 5])) != 0;
}
-static inline void set_bit_u16(int nr, u_int16_t *addr)
+static inline void set_bit_u16(int nr, uint16_t *addr)
{
addr[nr >> 4] |= (1UL << (nr & 15));
}
-static inline void unset_bit_u16(int nr, u_int16_t *addr)
+static inline void unset_bit_u16(int nr, uint16_t *addr)
{
addr[nr >> 4] &= ~(1UL << (nr & 15));
}
-static inline int test_bit_u16(int nr, const u_int16_t *addr)
+static inline int test_bit_u16(int nr, const uint16_t *addr)
{
return ((1UL << (nr & 15)) & (addr[nr >> 4])) != 0;
}
diff --git a/include/helper.h b/include/helper.h
index bd69af6..f412e55 100644
--- a/include/helper.h
+++ b/include/helper.h
@@ -25,7 +25,7 @@ struct ctd_helper {
int (*cb)(struct pkt_buff *pkt,
uint32_t protoff,
struct myct *ct,
- u_int32_t ctinfo);
+ uint32_t ctinfo);
struct ctd_helper_policy policy[CTD_HELPER_POLICY_MAX];