Date: Sat, 21 Jan 2006 16:27:00 GMT From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 90104 for review Message-ID: <200601211627.k0LGR0fm090116@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200601211627.k0LGR0fm090116>