This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 3/6] vfprintf: Define WORK_BUFFER_SIZE


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]