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

Re: memset bugs.



John Reiser <jreiser bitwagon com> writes:
> On 11/25/2009 02:03 PM, Dave Jones wrote:
>> A zero sized memset is always a bug.

> No, memset(,,0) is not always a bug.

I think it's reasonably safe to assume that a *literal constant* zero in
the third argument is a bug.  Whether the header macros can distinguish
that from compile-time-constant expressions is an interesting question,
but if they can, +1 for throwing an error.

			regards, tom lane


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