From 57ddd38c1a7791093531217a3adb15484c74f18c Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 13 Mar 2012 08:21:15 +0100 Subject: s3:torture: talloc_dict_traverse() returns the number of entries metze --- source3/torture/torture.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/source3/torture/torture.c b/source3/torture/torture.c index 99896ecc81..159dc0bd0c 100644 --- a/source3/torture/torture.c +++ b/source3/torture/torture.c @@ -7970,7 +7970,7 @@ static bool run_local_talloc_dict(int dummy) { struct talloc_dict *dict; struct talloc_dict_test *t; - int key, count; + int key, count, res; dict = talloc_dict_init(talloc_tos()); if (dict == NULL) { @@ -7989,7 +7989,8 @@ static bool run_local_talloc_dict(int dummy) } count = 0; - if (talloc_dict_traverse(dict, talloc_dict_traverse_fn, &count) != 0) { + res = talloc_dict_traverse(dict, talloc_dict_traverse_fn, &count); + if (res == -1) { return false; } @@ -7997,6 +7998,10 @@ static bool run_local_talloc_dict(int dummy) return false; } + if (count != res) { + return false; + } + TALLOC_FREE(dict); return true; -- cgit