diff options
author | Damien Miller <djm@mindrot.org> | 2014-05-15 18:01:52 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2014-05-15 18:01:52 +1000 |
commit | 7f1c264d3049cd95234e91970ccb5406e1d15b27 (patch) | |
tree | 6a96515de44203cc221ea5e0019bbf7bcfd9e5f4 /sshbuf.c | |
parent | e7429f2be8643e1100380a8a7389d85cc286c8fe (diff) |
- (djm) [sshbuf.c] need __predict_false
Diffstat (limited to 'sshbuf.c')
-rw-r--r-- | sshbuf.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -28,6 +28,16 @@ | |||
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 | |||
31 | static inline int | 41 | static inline int |
32 | sshbuf_check_sanity(const struct sshbuf *buf) | 42 | sshbuf_check_sanity(const struct sshbuf *buf) |
33 | { | 43 | { |