summaryrefslogtreecommitdiff
path: root/source3/lib/talloc
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/talloc')
-rw-r--r--source3/lib/talloc/libtalloc.m48
-rw-r--r--source3/lib/talloc/talloc.c4
2 files changed, 6 insertions, 6 deletions
diff --git a/source3/lib/talloc/libtalloc.m4 b/source3/lib/talloc/libtalloc.m4
index d2e8eba81a..fd2b4b22cd 100644
--- a/source3/lib/talloc/libtalloc.m4
+++ b/source3/lib/talloc/libtalloc.m4
@@ -1,10 +1,10 @@
dnl find the talloc sources. This is meant to work both for
dnl talloc standalone builds, and builds of packages using talloc
tallocdir=""
-tallocpaths="$srcdir $srcdir/lib/talloc $srcdir/talloc $srcdir/../talloc"
+tallocpaths=". lib/talloc talloc ../talloc"
for d in $tallocpaths; do
- if test -f "$d/talloc.c"; then
- tallocdir="$d"
+ if test -f "$srcdir/$d/talloc.c"; then
+ tallocdir="$d"
AC_SUBST(tallocdir)
break;
fi
@@ -15,7 +15,7 @@ fi
TALLOC_OBJ="talloc.o"
AC_SUBST(TALLOC_OBJ)
-TALLOC_CFLAGS="-I$tallocdir"
+TALLOC_CFLAGS="-I$srcdir/$tallocdir"
AC_SUBST(TALLOC_CFLAGS)
TALLOC_LIBS=""
diff --git a/source3/lib/talloc/talloc.c b/source3/lib/talloc/talloc.c
index 9dcd8a2a83..d535c3d784 100644
--- a/source3/lib/talloc/talloc.c
+++ b/source3/lib/talloc/talloc.c
@@ -85,8 +85,8 @@
#define likely(x) __builtin_expect(!!(x), 1)
#define unlikely(x) __builtin_expect(!!(x), 0)
#else
-#define likely(x) x
-#define unlikely(x) x
+#define likely(x) (x)
+#define unlikely(x) (x)
#endif
/* this null_context is only used if talloc_enable_leak_report() or