PERFORCE change 90059 for review
Robert Watson
rwatson at FreeBSD.org
Sat Jan 21 12:09:08 GMT 2006
http://perforce.freebsd.org/chv.cgi?CH=90059
Change 90059 by rwatson at rwatson_sesame on 2006/01/21 12:08:41
Parenthesize macro arguments.
Don't check unsigned variable for negative values.
Submitted by: phk
Found with: FlexeLint
Affected files ...
.. //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#23 edit
Differences ...
==== //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#23 (text+ko) ====
@@ -59,13 +59,13 @@
#define GET_TOKEN_AREA(t, dptr, length) do { \
t = malloc (sizeof(token_t)); \
if (t != NULL) { \
- t->len = length; \
- t->t_data = malloc (length * sizeof(u_char)); \
+ t->len = (length); \
+ t->t_data = malloc ((length) * sizeof(u_char)); \
if ((dptr = t->t_data) == NULL) { \
free(t); \
t = NULL; \
} else \
- memset(dptr, 0, length); \
+ memset(dptr, 0, (length)); \
} \
} while (0)
@@ -527,7 +527,7 @@
token_t *t;
u_char *dptr = NULL;
- if ((data == NULL) || (bytes <= 0)) {
+ if (data == NULL) {
errno = EINVAL;
return (NULL);
}
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