From 480ee7243c06aff088c6ad7c2fd122f87c58f42d Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 5 Feb 2005 23:10:31 +0000 Subject: r5240: Don't return WERR_OK when no values were found (reported by Matt Cobb) (This used to be commit f2e6d71584672e9bf0eaa7176d76781a30d317d1) --- source4/lib/registry/common/reg_interface.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source4/lib/registry/common/reg_interface.c') diff --git a/source4/lib/registry/common/reg_interface.c b/source4/lib/registry/common/reg_interface.c index 42bf8f9389..407d0d3345 100644 --- a/source4/lib/registry/common/reg_interface.c +++ b/source4/lib/registry/common/reg_interface.c @@ -384,10 +384,10 @@ WERROR reg_key_get_value_by_name(TALLOC_CTX *mem_ctx, struct registry_key *key, } } - if(!W_ERROR_IS_OK(error) && !W_ERROR_EQUAL(error, WERR_NO_MORE_ITEMS)) - return error; - - return WERR_OK; + if (W_ERROR_EQUAL(error, WERR_NO_MORE_ITEMS)) + return WERR_DEST_NOT_FOUND; + + return error; } WERROR reg_key_del(struct registry_key *parent, const char *name) -- cgit