summaryrefslogtreecommitdiff
path: root/include/bitops.h
diff options
context:
space:
mode:
authorAlex Harpin <development@landsofshadow.co.uk>2015-10-02 07:43:42 +0100
committerAlex Harpin <development@landsofshadow.co.uk>2015-10-02 07:43:42 +0100
commitef5ae91676c8ada2a12ea72f889a54452dd94981 (patch)
tree0a962905ab9d0c2322f627928521a10c4cb5e20f /include/bitops.h
parent9f9a63cecdc6ac4f449d3eacda6c591f0de9fbf3 (diff)
parent8845f3db20c951fcf1db3229a818cfd185f17f2e (diff)
downloadconntrack-tools-ef5ae91676c8ada2a12ea72f889a54452dd94981.tar.gz
conntrack-tools-ef5ae91676c8ada2a12ea72f889a54452dd94981.zip
Merge remote-tracking branch 'source/master' into upstreamupstream
Diffstat (limited to 'include/bitops.h')
-rw-r--r--include/bitops.h14
1 files changed, 7 insertions, 7 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;
}