question about strequal

Andreas Moroder andreas.moroder at gmx.net
Fri Sep 10 04:20:52 MDT 2010


Hello,

I don't know if there is a place where it can happen, but what if the
two parameters of

bool strequal(const char *s1, const char *s2)
{
        if (s1 == s2)
                return(true);
        if (!s1 || !s2)
                return(false);

        return(StrCaseCmp(s1,s2)==0);
}

are both NULL. Shouldn't the result be TRUE ? Actualy it is FALSE.

Bye
Andreas



More information about the samba-technical mailing list