summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2003-02-24 02:12:39 +0000
committerTim Potter <tpot@samba.org>2003-02-24 02:12:39 +0000
commite25aa22a8ff46b3c29fc373a585d8a5e5cc37296 (patch)
treee243fc97330f7bb6b93f11f82b0349a1fa3d7e4b
parentded88da1ea1fdcd6da017de2e1378578971f7645 (diff)
downloadsamba-e25aa22a8ff46b3c29fc373a585d8a5e5cc37296.tar.gz
samba-e25aa22a8ff46b3c29fc373a585d8a5e5cc37296.tar.bz2
samba-e25aa22a8ff46b3c29fc373a585d8a5e5cc37296.zip
Merge:
> Exit path cleanup for cli_samr_enum_dom_users() (This used to be commit 655c1e03519d4fa174a85534c165bdd1ce163ae8)
-rw-r--r--source3/rpc_client/cli_samr.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/source3/rpc_client/cli_samr.c b/source3/rpc_client/cli_samr.c
index 08c68b7632..c451ee2e42 100644
--- a/source3/rpc_client/cli_samr.c
+++ b/source3/rpc_client/cli_samr.c
@@ -590,16 +590,14 @@ NTSTATUS cli_samr_enum_dom_users(struct cli_state *cli, TALLOC_CTX *mem_ctx,
if(!samr_io_r_enum_dom_users("", &r, &rbuf, 0))
goto done;
- /* return the data obtained in response */
- if (!NT_STATUS_IS_OK(r.status) &&
- (NT_STATUS_EQUAL(r.status, STATUS_MORE_ENTRIES) ||
- NT_STATUS_EQUAL(r.status, NT_STATUS_NO_MORE_ENTRIES))) {
- return r.status;
- }
+ result = r.status;
+
+ if (!NT_STATUS_IS_OK(result) &&
+ NT_STATUS_V(result) != NT_STATUS_V(STATUS_MORE_ENTRIES))
+ goto done;
*start_idx = r.next_idx;
*num_dom_users = r.num_entries2;
- result = r.status;
if (r.num_entries2) {
/* allocate memory needed to return received data */