talloc_traverse_dict will return with -1 in case of an error and
might return positive values that indicate the count of found
entries
c.len = 0;
res = talloc_dict_traverse(members, getgr_calc_memberlen, &c);
- if (res != 0) {
+ if (res == -1) {
DEBUG(5, ("talloc_dict_traverse failed\n"));
return NT_STATUS_INTERNAL_ERROR;
}
}
res = talloc_dict_traverse(members, getgr_unparse_members, &m);
- if (res != 0) {
+ if (res == -1) {
DEBUG(5, ("talloc_dict_traverse failed\n"));
TALLOC_FREE(m.buf);
return NT_STATUS_INTERNAL_ERROR;