PERFORCE change 90109 for review
Robert Watson
rwatson at FreeBSD.org
Sat Jan 21 16:40:23 GMT 2006
http://perforce.freebsd.org/chv.cgi?CH=90109
Change 90109 by rwatson at rwatson_sesame on 2006/01/21 16:39:52
Re-add assertion for FlexeLint's benefit, it's still confused (or
we still are).
Affected files ...
.. //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#32 edit
Differences ...
==== //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#32 (text+ko) ====
@@ -58,17 +58,18 @@
#include <bsm/libbsm.h>
#define GET_TOKEN_AREA(t, dptr, length) do { \
- t = malloc(sizeof(token_t)); \
- if (t != NULL) { \
- t->len = (length); \
- dptr = t->t_data = malloc ((length) * sizeof(u_char)); \
- if (dptr == NULL) { \
+ (t) = malloc(sizeof(token_t)); \
+ if ((t) != NULL) { \
+ (t)->len = (length); \
+ (dptr) = (t->t_data) = malloc((length) * sizeof(u_char)); \
+ if ((dptr) == NULL) { \
free(t); \
- t = NULL; \
+ (t) = NULL; \
} else \
- memset(dptr, 0, (length)); \
+ memset((dptr), 0, (length)); \
} else \
- dptr = NULL; \
+ (dptr) = NULL; \
+ assert(t == NULL || dptr != NULL); \
} while (0)
/*
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