Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Oct 2005 11:44:26 GMT
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 85427 for review
Message-ID:  <200510171144.j9HBiQSF054252@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=85427

Change 85427 by rwatson@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); 
 }
 
 /*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200510171144.j9HBiQSF054252>