Currently, the xalloc module doesn't depend on any other.
I think it should depend at least on the calloc module.
If it did so, the test for overflow

  /* Test for overflow, since some calloc implementations don't have
     proper overflow checks.  */
  if (xalloc_oversized (n, s) || (! (p = calloc (n, s)) && n != 0))

could be removed, since it would then be guaranteed to use
a working calloc function.

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.

Any objection to such changes?


_______________________________________________
bug-gnulib mailing list
bug-gnulib@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnulib

Reply via email to