summaryrefslogtreecommitdiff
path: root/source4/lib/util
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/util')
-rw-r--r--source4/lib/util/config.mk2
-rw-r--r--source4/lib/util/tests/file.c4
-rw-r--r--source4/lib/util/util.h2
3 files changed, 4 insertions, 4 deletions
diff --git a/source4/lib/util/config.mk b/source4/lib/util/config.mk
index ab6b23dd6b..5a4b831ed5 100644
--- a/source4/lib/util/config.mk
+++ b/source4/lib/util/config.mk
@@ -23,7 +23,7 @@ LIBSAMBA-UTIL_OBJ_FILES = $(addprefix lib/util/, \
mutex.o \
idtree.o \
become_daemon.o \
- params.o
+ params.o)
PUBLIC_HEADERS += $(addprefix lib/util/, util.h \
attr.h \
diff --git a/source4/lib/util/tests/file.c b/source4/lib/util/tests/file.c
index fe87293671..3377e833dc 100644
--- a/source4/lib/util/tests/file.c
+++ b/source4/lib/util/tests/file.c
@@ -45,9 +45,9 @@ static bool test_file_load_save(struct torture_context *tctx)
data = file_load(TEST_FILENAME, &len, mem_ctx);
torture_assert(tctx, data, "loading file");
- torture_assert(tctx, len == strlen(TEST_DATA), "Length");
+ torture_assert_int_equal(tctx, len, strlen(TEST_DATA), "Length");
- torture_assert(tctx, memcmp(data, TEST_DATA, len) == 0, "Contents");
+ torture_assert_mem_equal(tctx, data, TEST_DATA, len, "Contents");
unlink(TEST_FILENAME);
return true;
diff --git a/source4/lib/util/util.h b/source4/lib/util/util.h
index 3bf6b98d2f..ffe83c14b2 100644
--- a/source4/lib/util/util.h
+++ b/source4/lib/util/util.h
@@ -64,7 +64,7 @@ extern const char *panic_action;
makes the return type safe.
*/
#ifndef discard_const
-#define discard_const(ptr) ((void *)((intptr_t)(ptr)))
+#define discard_const(ptr) ((void *)((uintptr_t)(ptr)))
#endif
/** Type-safe version of discard_const */