Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Jan 2006 16:34:11 GMT
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 90108 for review
Message-ID:  <200601211634.k0LGYBLW090891@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=90108

Change 90108 by rwatson@rwatson_sesame on 2006/01/21 16:33:34

	Parenthesize macro arguments.
	
	Submitted by:	phk
	Found with:	FlexeLint

Affected files ...

.. //depot/projects/trustedbsd/openbsm/bsm/audit_internal.h#6 edit

Differences ...

==== //depot/projects/trustedbsd/openbsm/bsm/audit_internal.h#6 (text+ko) ====

@@ -63,33 +63,33 @@
  */
 #define	ADD_U_CHAR(loc, val)						\
 	do {								\
-		*loc = val;						\
-		loc += sizeof(u_char);					\
+		*(loc) = (val);						\
+		(loc) += sizeof(u_char);				\
 	} while(0)
 
 
 #define	ADD_U_INT16(loc, val)						\
 	do {								\
-		be16enc(loc, val);					\
-		loc += sizeof(u_int16_t);				\
+		be16enc((loc), (val));					\
+		(loc) += sizeof(u_int16_t);				\
 	} while(0)
 
 #define	ADD_U_INT32(loc, val)						\
 	do {								\
-		be32enc(loc, val);					\
-		loc += sizeof(u_int32_t);				\
+		be32enc((loc), (val));					\
+		(loc) += sizeof(u_int32_t);				\
 	} while(0)
 
 #define	ADD_U_INT64(loc, val)						\
 	do {								\
-		be64enc(loc, val);					\
-		loc += sizeof(u_int64_t); 				\
+		be64enc((loc), (val));					\
+		(loc) += sizeof(u_int64_t); 				\
 	} while(0)
 
 #define	ADD_MEM(loc, data, size)					\
 	do {								\
-		memcpy(loc, data, size);				\
-		loc += size;						\
+		memcpy((loc), (data), (size));				\
+		(loc) += size;						\
 	} while(0)
 
 #define	ADD_STRING(loc, data, size)	ADD_MEM(loc, data, size)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200601211634.k0LGYBLW090891>