summaryrefslogtreecommitdiff
path: root/source4/librpc/ndr
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-11-02 10:59:43 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:44:03 +0100
commit131fc3a192cd4a23cbc01a0e0abb5033ca5aa049 (patch)
treea6923115f1ca135a3de027ab1d08614b711fc1b2 /source4/librpc/ndr
parent08994d44829ef540f6b77b56877b3230d0a7b74f (diff)
downloadsamba-131fc3a192cd4a23cbc01a0e0abb5033ca5aa049.tar.gz
samba-131fc3a192cd4a23cbc01a0e0abb5033ca5aa049.tar.bz2
samba-131fc3a192cd4a23cbc01a0e0abb5033ca5aa049.zip
r25797: use error and out logic
metze (This used to be commit d03965d36e18dd524076e48e5a315747a00b807b)
Diffstat (limited to 'source4/librpc/ndr')
-rw-r--r--source4/librpc/ndr/ndr.c8
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;
}
/*