1
0
mirror of https://github.com/samba-team/samba.git synced 2025-06-22 07:17:05 +03:00
Rusty Russell 754c677b0b lib: import ccan modules for tdb2
Imported from git://git.ozlabs.org/~ccan/ccan init-1161-g661d41f

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:34 +02:00

31 lines
589 B
C

#include <ccan/likely/likely.c>
#include <ccan/likely/likely.h>
#include <ccan/tap/tap.h>
#include <stdlib.h>
static bool one_seems_likely(unsigned int val)
{
if (likely(val == 1))
return true;
return false;
}
static bool one_seems_unlikely(unsigned int val)
{
if (unlikely(val == 1))
return true;
return false;
}
int main(int argc, char *argv[])
{
plan_tests(4);
/* Without debug, we can only check that it doesn't effect functions. */
ok1(one_seems_likely(1));
ok1(!one_seems_likely(2));
ok1(one_seems_unlikely(1));
ok1(!one_seems_unlikely(2));
exit(exit_status());
}