summaryrefslogtreecommitdiff
path: root/source4/lib/talloc
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/talloc')
-rw-r--r--source4/lib/talloc/testsuite.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source4/lib/talloc/testsuite.c b/source4/lib/talloc/testsuite.c
index 10810f30e9..477d9a5848 100644
--- a/source4/lib/talloc/testsuite.c
+++ b/source4/lib/talloc/testsuite.c
@@ -351,6 +351,7 @@ static BOOL test_misc(void)
void *root, *p1;
char *p2;
double *d;
+ const char *name;
printf("TESTING MISCELLANEOUS\n");
@@ -387,10 +388,10 @@ static BOOL test_misc(void)
CHECK_BLOCKS(p1, 1);
CHECK_BLOCKS(root, 2);
- talloc_set_name(p1, "my name is %s", "foo");
+ name = talloc_set_name(p1, "my name is %s", "foo");
if (strcmp(talloc_get_name(p1), "my name is foo") != 0) {
- printf("failed: wrong name after talloc_set_name(my name is foo) - '%s'\n",
- talloc_get_name(p1));
+ printf("failed: wrong name after talloc_set_name(my name is foo) - '%s'=>'%s'\n",
+ (name?name:"NULL"), talloc_get_name(p1));
return False;
}
CHECK_BLOCKS(p1, 2);