MemSetLoop ignoring the 'val' parameter

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: MemSetLoop ignoring the 'val' parameter
Date: 2012-10-08 20:39:27
Message-ID: 201210082239.28000.andres@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2012-10-08 20:58:56 Re: MemSetLoop ignoring the 'val' parameter
Previous Message Magnus Hagander 2012-10-08 20:36:54 Re: why repl_gram.h?