diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-11-02 10:59:43 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:44:03 +0100 |
commit | 131fc3a192cd4a23cbc01a0e0abb5033ca5aa049 (patch) | |
tree | a6923115f1ca135a3de027ab1d08614b711fc1b2 | |
parent | 08994d44829ef540f6b77b56877b3230d0a7b74f (diff) | |
download | samba-131fc3a192cd4a23cbc01a0e0abb5033ca5aa049.tar.gz samba-131fc3a192cd4a23cbc01a0e0abb5033ca5aa049.tar.bz2 samba-131fc3a192cd4a23cbc01a0e0abb5033ca5aa049.zip |
r25797: use error and out logic
metze
(This used to be commit d03965d36e18dd524076e48e5a315747a00b807b)
-rw-r--r-- | source4/librpc/ndr/ndr.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source4/librpc/ndr/ndr.c b/source4/librpc/ndr/ndr.c index 844d34e8c0..71d1e6c8e9 100644 --- a/source4/librpc/ndr/ndr.c +++ b/source4/librpc/ndr/ndr.c @@ -606,9 +606,13 @@ _PUBLIC_ uint32_t ndr_token_peek(struct ndr_token_list **list, const void *key) { NTSTATUS status; uint32_t v; + status = ndr_token_retrieve_cmp_fn(list, key, &v, NULL, false); - if (NT_STATUS_IS_OK(status)) return v; - return 0; + if (!NT_STATUS_IS_OK(status)) { + return 0; + } + + return v; } /* |