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

Re: [master] Introduces CHECK_ASPRINTF macro that checks asprintfs return value and terminates program in OOM scenarios.

On 11/13/2009 08:47 PM, David Cantrell wrote:
Hash: SHA1

I'm personally not a fan of using macros for more than constant values.
However, I can see this helping guarantee correct asprintf() usage. I would
like to see:

1) The alignment of "\" on the ends of the macro lines corrected.

2) All asprintf() usages throughout loader changed, not just those in

Hi David,

I just sent the new patch complying with your requests. I left the old asprintf() calls in places where replacing them with the macro would change the current behavior (e.g. where some error code is returned from the function instead of aborting) --- this was the case with 15 out of 87 asprintf() calls. I however think that those cases should gradually also be replaced with the terminating macro.

If there are no more objections I am going to push the patch to master after I verify that I can build it.


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