[PATCH 3/6] vfprintf: Define WORK_BUFFER_SIZE
Florian Weimer
fweimer@redhat.com
Tue Mar 3 07:38:00 GMT 2015
On 03/03/2015 03:07 AM, Paul Eggert wrote:
> Florian Weimer wrote:
>> - CHAR_T work_buffer[1000];
>> +#define WORK_BUFFER_SIZE 1000
>> + CHAR_T work_buffer[WORK_BUFFER_SIZE];
>
> Another nit: I suggest avoiding the macro, as it's confusing when
> #defined inside a function body but intended to be used outside the
> function, and instead doing this at the top level:
>
> enum { WORK_BUFFER_SIZE = 1000 };
>
> The general idea is to use a macro only when necessary.
Good idea, thanks.
--
Florian Weimer / Red Hat Product Security
More information about the Libc-alpha
mailing list