-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Pádraig Brady on 8/16/2006 2:50 AM: > +++ memcoll-errno.c 2006-08-16 06:50:28.000000000 +0000 > @@ -43,7 +43,10 @@ > the buffers using strcoll on each substring. */ > > if (s1len == s2len && memcmp (s1, s2, s1len) == 0) > - diff = 0; > + { > + diff = 0; > + errno = 0; > + }
This seems a bit fishy to me. In the strcoll counterpart, POSIX states that strcoll must not set errno to 0, and that the value of errno is unchanged on success (an app desiring to check for failure must set errno to 0 itself before calling strcoll). For consistency, would it be better if we changed memcoll to behave likewise? On the other hand, I guess we did document in memcoll.c that memcoll explicitly sets errno to 0 on success, making memcoll not quite like strcoll. - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.1 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFE4xEf84KuGfSFAYARAlqEAKC3doVpxB3NdH9+1Mxx2MbmfQuKQQCffD3N BGviajhQdVbKg1CjKhsK8fg= =jAsQ -----END PGP SIGNATURE----- _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils