Merge:
authorTim Potter <tpot@samba.org>
Mon, 24 Feb 2003 02:12:39 +0000 (02:12 +0000)
committerTim Potter <tpot@samba.org>
Mon, 24 Feb 2003 02:12:39 +0000 (02:12 +0000)
> Exit path cleanup for cli_samr_enum_dom_users()
(This used to be commit 655c1e03519d4fa174a85534c165bdd1ce163ae8)

source3/rpc_client/cli_samr.c

index 08c68b76325b610d710867d8b18f1c12a09fd7a7..c451ee2e4209524c4de4530ad630b9ac4ad681df 100644 (file)
@@ -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 */