summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-03-13 08:21:15 +0100
committerStefan Metzmacher <metze@samba.org>2012-03-13 08:26:35 +0100
commit57ddd38c1a7791093531217a3adb15484c74f18c (patch)
tree4cfddae9aeac05ce6c5c0cec0c6aacfc6400e0a0
parent8af7dadca2c820e125c6059eef62e2a4c76f7ff3 (diff)
downloadsamba-57ddd38c1a7791093531217a3adb15484c74f18c.tar.gz
samba-57ddd38c1a7791093531217a3adb15484c74f18c.tar.bz2
samba-57ddd38c1a7791093531217a3adb15484c74f18c.zip
s3:torture: talloc_dict_traverse() returns the number of entries
metze
-rw-r--r--source3/torture/torture.c9
1 files 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;