Sir,

I have worked upon this bug and ready with the diff.
My open solaris user id is : krishna.
SCA number : OS0191

BUG ID : 6207957

SYNOPSIS: uu_list_find() leaves error unset when successfully returning NULL

DESCRIPTION:

If uu_list_find() is called on a list which doesn't have a comparison

function, then it sets the uu_error() to UU_ERROR_NOT_SUPPORTED and

returns NULL.  NULL is also the return value for when uu_list_find()

completes successfully, but didn't find anything.  If the uu_error()

happened to be UU_ERROR_NOT_SUPPORTED before uu_list_find() was

called, then there's no way for the caller to know whether the function

completed successfully.



CATEGORY: library



SUBCATEGORY:libuutil

DIFF'S OUTPUT:
*****************************************************************************************************

--- uu_list.c.orig      Tue Oct  2 19:44:01 2007

+++ uu_list.c   Sat Jan 12 10:46:29 2008

@@ -330,16 +330,19 @@

                if (cmp == 0) {

                        if (out != NULL)

                                *out = NODE_TO_INDEX(lp, np);

+                               uu_set_error(UU_ERROR_NONE);

                        return (ep);

                }

                if (sorted && cmp > 0) {

                        if (out != NULL)

                                *out = NODE_TO_INDEX(lp, np);

+                               uu_set_error(UU_ERROR_NONE);

                        return (NULL);

                }

        }

        if (out != NULL)

                *out = NODE_TO_INDEX(lp, 0);

+               uu_set_error(UU_ERROR_NONE);

        return (NULL);
 }
******************************************************************************
Thanks & Regards
Krishna Kumar

* *

* *
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://mail.opensolaris.org/pipermail/request-sponsor/attachments/20080113/2953f281/attachment.html>

Reply via email to