diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2005-02-05 23:10:31 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:09:33 -0500 |
commit | 480ee7243c06aff088c6ad7c2fd122f87c58f42d (patch) | |
tree | 0dfbe1b27012b07ba8d430f50f26d2b35a19c979 /source4/lib/registry | |
parent | 58a957035336119a3a023384fef205ae718fdf1b (diff) | |
download | samba-480ee7243c06aff088c6ad7c2fd122f87c58f42d.tar.gz samba-480ee7243c06aff088c6ad7c2fd122f87c58f42d.tar.bz2 samba-480ee7243c06aff088c6ad7c2fd122f87c58f42d.zip |
r5240: Don't return WERR_OK when no values were found (reported by Matt Cobb)
(This used to be commit f2e6d71584672e9bf0eaa7176d76781a30d317d1)
Diffstat (limited to 'source4/lib/registry')
-rw-r--r-- | source4/lib/registry/common/reg_interface.c | 8 |
1 files changed, 4 insertions, 4 deletions
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) |