aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/include/c.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/include/c.h b/src/include/c.h
index b38d8a33edd..88a2ae41b3f 100644
--- a/src/include/c.h
+++ b/src/include/c.h
@@ -12,7 +12,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: c.h,v 1.156 2003/10/21 15:32:58 tgl Exp $
+ * $Id: c.h,v 1.156.2.1 2005/07/18 15:54:11 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -606,21 +606,22 @@ typedef NameData *Name;
#define MemSet(start, val, len) \
do \
{ \
- int32 * _start = (int32 *) (start); \
+ void *_vstart = (void *) (start); \
int _val = (val); \
Size _len = (len); \
\
- if ((((long) _start) & INT_ALIGN_MASK) == 0 && \
+ if ((((long) _vstart) & INT_ALIGN_MASK) == 0 && \
(_len & INT_ALIGN_MASK) == 0 && \
_val == 0 && \
_len <= MEMSET_LOOP_LIMIT) \
{ \
- int32 * _stop = (int32 *) ((char *) _start + _len); \
+ int32 *_start = (int32 *) _vstart; \
+ int32 *_stop = (int32 *) ((char *) _start + _len); \
while (_start < _stop) \
*_start++ = 0; \
} \
else \
- memset((char *) _start, _val, _len); \
+ memset(_vstart, _val, _len); \
} while (0)
#define MEMSET_LOOP_LIMIT 1024