[PATCH] Dynamic growable arrays for internal use
Florian Weimer
fweimer@redhat.com
Fri Jun 2 10:04:00 GMT 2017
On 06/02/2017 09:37 AM, Carlos O'Donell wrote:
> In summary the remaining points look like this:
>
> * Add rationale to malloc/dynarray.h as a comment explaining when and
> why you would use it instead of a scratch buffer. What you write below
> with some adjustments is good.
Okay, I added comments to dynarray.h.
>> diff --git a/support/capture_subprocess.h b/support/capture_subprocess.h
>> new file mode 100644
>> index 0000000..3265d63
>> --- /dev/null
>> +++ b/support/capture_subprocess.h
>> +/* Invoke CALLBACK (CLOSURE) in a subprocess and capture standard
>> + output, standard error, and the exit status. The out.buffer and
>> + err.buffer members in the result are null-terminated strings which
>> + can be examined by te caller. (out.out and err.out are NULL.) */
>
> s/te/the/g.
>
> Suggest:
> can be examined by the caller (out.out and err.out are NULL).
Thanks, fixed.
>> +
>> +#include <support/test-driver.c>
>> diff --git a/support/xdup2.c b/support/xdup2.c
>> new file mode 100644
>> index 0000000..f4a3759
>> --- /dev/null
>> +++ b/support/xdup2.c
>> @@ -0,0 +1,28 @@
>> +/* pipe with error checking.
>
> s/pipe/dup2/g
Fixed.
I adjusted the patch to the presence of check_mul_overflow_size_t in
<malloc-internal.h> and committed it.
Florian
More information about the Libc-alpha
mailing list