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
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
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!
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