From aef317ea57e71cbfb170bcd5c375047c6b117e03 Mon Sep 17 00:00:00 2001 From: metze Date: Fri, 2 Nov 2007 10:59:43 +0000 Subject: use error and out logic metze git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25797 0c0555d6-39d7-0310-84fc-f1cc0bd64818 (This used to be commit 55d01b3f5b55cab3228270c0f6c164f11b0803f5) --- source3/librpc/ndr/ndr.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'source3/librpc/ndr') diff --git a/source3/librpc/ndr/ndr.c b/source3/librpc/ndr/ndr.c index 797ba40612..8900e7a84f 100644 --- a/source3/librpc/ndr/ndr.c +++ b/source3/librpc/ndr/ndr.c @@ -569,9 +569,13 @@ 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; + + status = ndr_token_retrieve_cmp_fn(list, key, &v, NULL, false); + if (!NT_STATUS_IS_OK(status)) { + return 0; + } + + return v; } /* -- cgit