diff options
author | Jan Moskyto Matejka <mq@ucw.cz> | 2015-12-16 10:25:12 +0100 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2015-12-19 23:49:47 +0100 |
commit | 5e173e9f631913f68cf38d57a69c3ce6faf60d1e (patch) | |
tree | aa873aa790686a108cab830c63cae1f946f61e96 /lib/birdlib.h | |
parent | d7661fbe9dea980c61daa01a11a9aa59fa7be426 (diff) |
Stop perusing f_prefix for non-prefix-set uses
Multiple changes by Ondrej Santiago Zajicek
Diffstat (limited to 'lib/birdlib.h')
-rw-r--r-- | lib/birdlib.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/birdlib.h b/lib/birdlib.h index 16f437ef..5fec6c7a 100644 --- a/lib/birdlib.h +++ b/lib/birdlib.h @@ -35,6 +35,12 @@ #define DELTA(a,b) (((a)>=(b))?(a)-(b):(b)-(a)) #define ARRAY_SIZE(a) (sizeof(a)/sizeof(*(a))) +static inline int uint_cmp(uint i1, uint i2) +{ return (int)(i1 > i2) - (int)(i1 < i2); } + +static inline int u64_cmp(u64 i1, u64 i2) +{ return (int)(i1 > i2) - (int)(i1 < i2); } + /* Bitfield macros */ |