![]() | |||||||||||||
Messages in this thread |
On 1/7/06, Kurtis D. Rader <kdrader@us.ibm.com> wrote:
> On Fri, 2006-01-06 16:59:39, Benjamin Herrenschmidt wrote:
> > As far as I know, strncmp() is _NOT_ supposed to return 0 if one string
> > is shorter than the other and they match until that point
> I can't speak to the correctness of that code but your understanding of
> strncmp() is incorrect. From "GNU C Library Application Fundamentals":
I believe the original poster was asserting that
'strncmp("abc","abcd",100) should never return zero,' and not
'strncmp("abc","abcd",3) should never return zero.' Though I also
found the statement confusing at first.
-Bob
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
| ||||||||||||
| Last update: 2006-01-07 19:45 [from the cache] ©2003-2008 | |||||||||||||