mirror of
git://anongit.mindrot.org/openssh.git
synced 2024-12-26 20:02:13 +00:00
- (djm) [sshbuf.c] need __predict_false
This commit is contained in:
parent
e7429f2be8
commit
7f1c264d30
@ -139,6 +139,7 @@
|
||||
[regress/unittests/test_helper/fuzz.c]
|
||||
[regress/unittests/test_helper/test_helper.c]
|
||||
Hook new unit tests into the build and "make tests"
|
||||
- (djm) [sshbuf.c] need __predict_false
|
||||
|
||||
20140430
|
||||
- (dtucker) [defines.h] Define __GNUC_PREREQ__ macro if we don't already
|
||||
|
10
sshbuf.c
10
sshbuf.c
@ -28,6 +28,16 @@
|
||||
#include "ssherr.h"
|
||||
#include "sshbuf.h"
|
||||
|
||||
/* XXX move to defines.h? */
|
||||
#if defined(__GNUC__) && \
|
||||
((__GNUC__ > (2)) || (__GNUC__ == (2) && __GNUC_MINOR__ >= (96)))
|
||||
#define __predict_true(exp) __builtin_expect(((exp) != 0), 1)
|
||||
#define __predict_false(exp) __builtin_expect(((exp) != 0), 0)
|
||||
#else
|
||||
#define __predict_true(exp) ((exp) != 0)
|
||||
#define __predict_false(exp) ((exp) != 0)
|
||||
#endif
|
||||
|
||||
static inline int
|
||||
sshbuf_check_sanity(const struct sshbuf *buf)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user