PERFORCE change 85427 for review

Robert Watson rwatson at FreeBSD.org
Mon Oct 17 11:44:26 GMT 2005


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

Change 85427 by rwatson at rwatson_zoo on 2005/10/17 11:43:30

	Since kau_write() can't fail, and none of the callers check the
	return value, change the function to return void rather than int.

Affected files ...

.. //depot/projects/trustedbsd/audit3/sys/security/audit/kern_bsm_audit.c#20 edit

Differences ...

==== //depot/projects/trustedbsd/audit3/sys/security/audit/kern_bsm_audit.c#20 (text+ko) ====

@@ -86,18 +86,14 @@
 /*
  * Store the token with the record descriptor.
  */ 
-static int
+static void
 kau_write(struct au_record *rec, struct au_token *tok)
 {
 
-	/* XXXRW: KASSERT, void return instead? */
-	if (tok == NULL)
-		return -1; /* Invalid Token */
+	KASSERT(tok != NULL, ("kau_write: tok == NULL"));
 
 	TAILQ_INSERT_TAIL(&rec->token_q, tok, tokens);
 	rec->len += tok->len;
-	
-	return (0); 
 }
 
 /*
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