[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

mbspcasecmp comment bug

From: Eric Blake
Subject: mbspcasecmp comment bug
Date: Fri, 23 Jul 2010 09:08:06 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20100720 Fedora/3.1.1-1.fc13 Lightning/1.0b2pre Mnenhy/0.8.3 Thunderbird/3.1.1

I just noticed that the comments for mbspcasecmp are wrong:

/* Compare the initial segment of the character string STRING consisting of
   at most mbslen (PREFIX) characters with the character string PREFIX,
ignoring case, returning less than, equal to or greater than zero if this
   initial segment is lexicographically less than, equal to or greater than
   Note: This function may, in multibyte locales, return 0 if STRING is of
   smaller length than PREFIX!  */
char *
mbspcasecmp (const char *string, const char *prefix)

If I'm reading the code currectly, the actual result is NULL if no match, or a pointer into string corresponding to the next byte after the end of matched prefix.

Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

reply via email to

[Prev in Thread] Current Thread [Next in Thread]