summaryrefslogtreecommitdiff
path: root/src/include/c.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/c.h')
-rw-r--r--src/include/c.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/include/c.h b/src/include/c.h
index c703a2fc4bd..ae330d24050 100644
--- a/src/include/c.h
+++ b/src/include/c.h
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: c.h,v 1.37 1998/03/20 04:17:34 momjian Exp $
+ * $Id: c.h,v 1.38 1998/03/31 15:53:39 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -703,7 +703,15 @@ typedef struct Exception
*/
/* we do this so if the macro is used in an if action, it will work */
#define StrNCpy(dst,src,len) \
- (strncpy((dst),(src),(len)),(len > 0) ? *((dst)+(len)-1)='\0' : (dummyret)NULL,(void)(dst))
+( \
+ ((len) > 0) ? \
+ ( \
+ strncpy((dst),(src),(len)-1), \
+ *((dst)+(len)-1)='\0' \
+ ) \
+ : \
+ (dummyret)NULL,(void)(dst) \
+)
/* Get a bit mask of the bits set in non-int32 aligned addresses */
#define INT_ALIGN_MASK (sizeof(int32) - 1)