MemSetLoop ignoring the 'val' parameter - Mailing list pgsql-hackers

From Andres Freund
Subject MemSetLoop ignoring the 'val' parameter
Date
Msg-id 201210082239.28000.andres@2ndquadrant.com
Whole thread Raw
Responses Re: MemSetLoop ignoring the 'val' parameter  (Andres Freund <andres@2ndquadrant.com>)
Re: MemSetLoop ignoring the 'val' parameter  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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



pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: why repl_gram.h?
Next
From: Andres Freund
Date:
Subject: Re: MemSetLoop ignoring the 'val' parameter