Mercurial > illumos > illumos-gate
changeset 13270:33c640a24eb2
89 uu_list_find() leaves error unset when successfully returning NULL
Reviewed by: garrett@nexenta.com
Reviewed by: eric.schrock@delphix.com
Approved by: trisk@nexenta.com
author | Jason King <jason@ansipunx.net> |
---|---|
date | Thu, 20 Jan 2011 22:59:52 -0600 |
parents | 52325acbd90e |
children | 5aca6ad7a5d9 |
files | usr/src/lib/libuutil/common/uu_list.c |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/lib/libuutil/common/uu_list.c Thu Jan 20 22:09:09 2011 +0300 +++ b/usr/src/lib/libuutil/common/uu_list.c Thu Jan 20 22:59:52 2011 -0600 @@ -18,13 +18,14 @@ * * CDDL HEADER END */ + /* * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. + * + * Copyright 2011 Jason King. All rights reserved. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include "libuutil_common.h" #include <stdlib.h> @@ -318,6 +319,8 @@ uu_compare_fn_t *func = lp->ul_pool->ulp_cmp; uu_list_node_impl_t *np; + uu_set_error(UU_ERROR_NONE); + if (func == NULL) { if (out != NULL) *out = 0;