From owner-p4-projects@FreeBSD.ORG Sat Jan 21 16:27:02 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 AF82216A422; Sat, 21 Jan 2006 16:27:01 +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 7067416A41F for ; Sat, 21 Jan 2006 16:27:01 +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 2D70443D45 for ; Sat, 21 Jan 2006 16:27:01 +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 k0LGR1Gb090119 for ; Sat, 21 Jan 2006 16:27:01 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 k0LGR0fm090116 for perforce@freebsd.org; Sat, 21 Jan 2006 16:27:00 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sat, 21 Jan 2006 16:27:00 GMT Message-Id: <200601211627.k0LGR0fm090116@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 90104 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:27:02 -0000 http://perforce.freebsd.org/chv.cgi?CH=90104 Change 90104 by rwatson@rwatson_sesame on 2006/01/21 16:26:22 Fix typos, avoid &'s of arrays, and insert a missing return; Submitted by: phk Found with: FlexeLint Affected files ... .. //depot/projects/trustedbsd/openbsm/libbsm/bsm_io.c#25 edit Differences ... ==== //depot/projects/trustedbsd/openbsm/libbsm/bsm_io.c#25 (text+ko) ==== @@ -1140,7 +1140,8 @@ * count 4 bytes * text count null-terminated string(s) */ -static int fetch_execarg_tok(tokenstr_t *tok, char *buf, int len) +static int +fetch_execarg_tok(tokenstr_t *tok, char *buf, int len) { int err = 0; int i; @@ -1150,7 +1151,7 @@ if (err) return (-1); - for (i = 0; i< tok->tt.execarg.count; i++) { + for (i = 0; i < tok->tt.execarg.count; i++) { bptr = buf + tok->len; tok->tt.execarg.text[i] = bptr; @@ -1355,7 +1356,7 @@ if (err) return (-1); } else if (tok->tt.inaddr_ex.type == AU_IPv6) { - READ_TOKEN_BYTES(buf, len, &tok->tt.inaddr_ex.addr, + READ_TOKEN_BYTES(buf, len, tok->tt.inaddr_ex.addr, sizeof(tok->tt.inaddr_ex.addr), tok->len, err); if (err) return (-1); @@ -1776,7 +1777,7 @@ if (err) return (-1); } else if (tok->tt.proc32_ex.tid.type == AU_IPv6) { - READ_TOKEN_BYTES(buf, len, &tok->tt.proc32_ex.tid.addr, + READ_TOKEN_BYTES(buf, len, tok->tt.proc32_ex.tid.addr, sizeof(tok->tt.proc32_ex.tid.addr), tok->len, err); if (err) return (-1); @@ -1951,7 +1952,7 @@ if (err) return (-1); - READ_TOKEN_BYTES(buf, len, &tok->tt.sockunix.path, 104, tok->len, + READ_TOKEN_BYTES(buf, len, tok->tt.sockunix.path, 104, tok->len, err); if (err) return (-1); @@ -2596,6 +2597,7 @@ case AUT_ATTR64: print_attr64_tok(outfp, tok, del, raw, sfrm); + return; case AUT_EXIT: print_exit_tok(outfp, tok, del, raw, sfrm);