From e25aa22a8ff46b3c29fc373a585d8a5e5cc37296 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 24 Feb 2003 02:12:39 +0000 Subject: Merge: > Exit path cleanup for cli_samr_enum_dom_users() (This used to be commit 655c1e03519d4fa174a85534c165bdd1ce163ae8) --- source3/rpc_client/cli_samr.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'source3/rpc_client/cli_samr.c') 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 */ -- cgit