From owner-p4-projects@FreeBSD.ORG Sat Jan 21 16:40:24 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 28CF516A422; Sat, 21 Jan 2006 16:40:24 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DC24D16A41F for ; Sat, 21 Jan 2006 16:40:23 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A2A4343D49 for ; Sat, 21 Jan 2006 16:40:23 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k0LGeNkM091674 for ; Sat, 21 Jan 2006 16:40:23 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k0LGeNUe091669 for perforce@freebsd.org; Sat, 21 Jan 2006 16:40:23 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sat, 21 Jan 2006 16:40:23 GMT Message-Id: <200601211640.k0LGeNUe091669@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 90109 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jan 2006 16:40:24 -0000 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 #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) /*