(memcoll): Set errno = 0 in the shortcut case, too.

This commit is contained in:
Paul Eggert committed 2006-08-16 17:24:35 +00:00
1 parent 061a90d68a
commit f048f049e7
2 files changed
+10 -1

No files matched your search

+6
View File
@@ -1,3 +1,9 @@
2006-08-16 Paul Eggert <eggert@cs.ucla.edu>
* memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
Problem and fix reported by Pádraig Brady in
<http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
2006-08-16 Jim Meyering <jim@meyering.net>
* fts.c (fts_children): Remove obsolete "// FIXME ..." comment.
+4 -1
View File
@@ -43,7 +43,10 @@ memcoll (char *s1, size_t s1len, char *s2, size_t s2len)
the buffers using strcoll on each substring. */
if (s1len == s2len && memcmp (s1, s2, s1len) == 0)
diff = 0;
{
errno = 0;
diff = 0;
}
else
{
char n1 = s1[s1len];