[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-tar] Error "Cannot allocate memory" incorrectly reported in som
Re: [Bug-tar] Error "Cannot allocate memory" incorrectly reported in some cases.
Sat, 29 Oct 2005 12:14:00 EEST
Paul Eggert <address@hidden> wrote:
> Thanks for the diagnosis, but the fix isn't quite right in general,
> since the C standard says memcpy can set errno as well.
> I installed this patch instead, both in gnulib and coreutils.
OK, I just thought, however, that readdir itself is not required
to preserve the value of errno in case of succesful return. In general,
it seems a bad idea to check errno without knowing which call might
have changed it.