89 uu_list_find() leaves error unset when successfully returning NULL
authorJason King <jason@ansipunx.net>
Thu, 20 Jan 2011 22:59:52 -0600
changeset 13270 33c640a24eb2
parent 13269 52325acbd90e
child 13271 5aca6ad7a5d9
89 uu_list_find() leaves error unset when successfully returning NULL Reviewed by: [email protected] Reviewed by: [email protected] Approved by: [email protected]
usr/src/lib/libuutil/common/uu_list.c
--- 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;