bug-gnulib
[Top][All Lists]
Advanced

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

[Bug-gnulib] Re: Coreutils 5.0.1: spurious error from uniq


From: Andreas Schwab
Subject: [Bug-gnulib] Re: Coreutils 5.0.1: spurious error from uniq
Date: Fri, 18 Jul 2003 23:02:11 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3.50 (gnu/linux)

Paul Eggert <address@hidden> writes:

|> Andreas Schwab <address@hidden> writes:
|> 
|> > 2003-07-18  Andreas Schwab  <address@hidden>
|> > 
|> >    * memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
|> > 
|> > --- coreutils-5.0.1/lib/memcoll.c.~1~      2003-06-06 22:11:58.000000000 
+0200
|> > +++ coreutils-5.0.1/lib/memcoll.c  2003-07-18 11:58:37.000000000 +0200
|> > @@ -83,6 +83,7 @@ memcoll (char *s1, size_t s1len, char *s
|> >    diff = memcmp (s1, s2, s1len < s2len ? s1len : s2len);
|> >    if (! diff)
|> >      diff = s1len < s2len ? -1 : s1len != s2len;
|> > +  errno = 0;
|> >  
|> >  #endif
|> >  
|> 
|> Thanks for that fix.  I checked it into gnulib.  (Wow, your memcmp
|> implementation sets errno?  It's allowed to, but out of curiosity why
|> does it do that?)

It doesn't do that, errno was already non-zero before the call.
Originally I put the assignment before the memcmp, but then I thought that
a sufficiently perverse implementation might fail here.

Andreas.

-- 
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




reply via email to

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