MemSetLoop ignoring the 'val' parameter

Andres Freund <andres@2ndquadrant.com>

From: Andres Freund <andres@2ndquadrant.com>
To: pgsql-hackers@postgresql.org
Date: 2012-10-08T20:39:27Z
Lists: pgsql-hackers
Hi,

#define MemSetLoop(start, val, len) \
	do \
	{ \
		long * _start = (long *) (start); \
		long * _stop = (long *) ((char *) _start + (Size) (len)); \
	\
		while (_start < _stop) \
			*_start++ = 0; \
	} while (0)

The 'val' parameter is ignored.

Currently it doesn't matter because MemSetLoop is only used with a 0 parameter 
and only so in mcxt.c but it looks like it should be fixed anyway.

Andres
-- 
 Andres Freund	                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services