bug-gnulib
[Top][All Lists]
Advanced

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

Re: Feature Request: Implement glibc reallocarray() function


From: Paul Eggert
Subject: Re: Feature Request: Implement glibc reallocarray() function
Date: Thu, 10 Aug 2017 06:27:50 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

Thanks, a few more things (hopefully we're getting to the end now).

"missing on many platforms" lists reallocarray as missing in FreeBSD 11.1, NetBSD 8.0, and OpenBSD 5.6. But it's not missing in those versions: those are the versions it was first introduced.

Please fit ChangeLog entries to 79 columns if possible.

When talking about a function FOO, say just "FOO", not "FOO()". Use the latter form only when talking about calls to FOO with zero arguments.

The test could be easier to read and more useful if we got rid of the 'eight' function and tried realloc_array with several different sizes. Also, there's no need to free the array. E.g.,

   size_t n;
   for (n = 2; n != 0; n <<= 1)
     if (reallocarray (NULL, (size_t) -1 / n + 1, n))
       return 1;
   return 0;



reply via email to

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