Date: Sat, 21 Jan 2006 16:40:23 GMT From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 90109 for review Message-ID: <200601211640.k0LGeNUe091669@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=90109 Change 90109 by rwatson@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) /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200601211640.k0LGeNUe091669>