PERFORCE change 90104 for review

Robert Watson rwatson at FreeBSD.org
Sat Jan 21 16:27:00 GMT 2006


http://perforce.freebsd.org/chv.cgi?CH=90104

Change 90104 by rwatson at 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);
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