diff options
author | Damien Miller <djm@mindrot.org> | 2014-09-03 05:33:25 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2014-09-03 05:33:25 +1000 |
commit | 23f269562b7537b2f6f5014e50a25e5dcc55a837 (patch) | |
tree | 86cae8862abbdb5c726a557aeacabd9f0eca3592 /sshbuf.c | |
parent | 41c8de2c0031cf59e7cf0c06b5bcfbf4852c1fda (diff) |
- (djm) [defines.h sshbuf.c] Move __predict_true|false to defines.h and
conditionalise to avoid duplicate definition.
Diffstat (limited to 'sshbuf.c')
-rw-r--r-- | sshbuf.c | 10 |
1 files changed, 0 insertions, 10 deletions
@@ -28,16 +28,6 @@ | |||
28 | #include "ssherr.h" | 28 | #include "ssherr.h" |
29 | #include "sshbuf.h" | 29 | #include "sshbuf.h" |
30 | 30 | ||
31 | /* XXX move to defines.h? */ | ||
32 | #if defined(__GNUC__) && \ | ||
33 | ((__GNUC__ > (2)) || (__GNUC__ == (2) && __GNUC_MINOR__ >= (96))) | ||
34 | #define __predict_true(exp) __builtin_expect(((exp) != 0), 1) | ||
35 | #define __predict_false(exp) __builtin_expect(((exp) != 0), 0) | ||
36 | #else | ||
37 | #define __predict_true(exp) ((exp) != 0) | ||
38 | #define __predict_false(exp) ((exp) != 0) | ||
39 | #endif | ||
40 | |||
41 | static inline int | 31 | static inline int |
42 | sshbuf_check_sanity(const struct sshbuf *buf) | 32 | sshbuf_check_sanity(const struct sshbuf *buf) |
43 | { | 33 | { |