PERFORCE change 90108 for review
Robert Watson
rwatson at FreeBSD.org
Sat Jan 21 16:34:11 GMT 2006
http://perforce.freebsd.org/chv.cgi?CH=90108
Change 90108 by rwatson at 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)
To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message
More information about the trustedbsd-cvs
mailing list