git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8af7dad
)
s3:torture: talloc_dict_traverse() returns the number of entries
author
Stefan Metzmacher
<metze@samba.org>
Tue, 13 Mar 2012 07:21:15 +0000
(08:21 +0100)
committer
Stefan Metzmacher
<metze@samba.org>
Tue, 13 Mar 2012 07:26:35 +0000
(08:26 +0100)
metze
source3/torture/torture.c
patch
|
blob
|
history
diff --git
a/source3/torture/torture.c
b/source3/torture/torture.c
index 99896ecc812eeb93057e5cd56f142fc271746c75..159dc0bd0c914318038ddc43bf14dafecdf36ede 100644
(file)
--- 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;