Re: xmalloc.c's xcalloc performs unnecessary test for N*S overflow

2005-06-22 Thread Paul Eggert
I installed the following (slightly different) patch for that problem, into gnulib. It's tested with GNU tar. 2005-06-22 Paul Eggert [EMAIL PROTECTED] * xmalloc.c (HAVE_GNU_CALLOC): New constant. (xcalloc): Use it to avoid needless tests. Problem reported by Jim

Re: xmalloc.c's xcalloc performs unnecessary test for N*S overflow

2005-06-17 Thread Paul Eggert
Jim Meyering [EMAIL PROTECTED] writes: This makes me think it'd be worthwhile to support a new section in the modules file listing `Recommended' modules. Yes, that would be nice. It's been suggested before but nobody has had the time yet to do it. gnulib-tool might bring in recommended

Re: xmalloc.c's xcalloc performs unnecessary test for N*S overflow

2005-06-17 Thread Jim Meyering
Paul Eggert [EMAIL PROTECTED] wrote: ... How about the following (also untested) patch? 2005-06-17 Paul Eggert [EMAIL PROTECTED] * xmalloc (HAVE_GNU_CALLOC): New macro. (xcalloc): Omit needless tests if ! HAVE_GNU_CALLOC. Looks fine to me. Thanks!

Re: xmalloc.c's xcalloc performs unnecessary test for N*S overflow

2005-06-16 Thread Paul Eggert
Jim Meyering [EMAIL PROTECTED] writes: As it stands, if I use both of the xalloc and calloc modules, calling xcalloc ends up performing the overflow check twice, first in xcalloc itself (above), and then again in calloc. Also, xcalloc contains a test n != 0 that isn't needed when rpl_calloc