summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}
/*