From seggers@semyam.dinoco.de  Fri Jul 10 07:21:13 1998
Received: from tim.xenologics.com (tim.xenologics.com [194.77.5.24])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA16124
          for <FreeBSD-gnats-submit@freebsd.org>; Fri, 10 Jul 1998 07:21:10 -0700 (PDT)
          (envelope-from seggers@semyam.dinoco.de)
Received: (from uucp@localhost)
	by tim.xenologics.com (8.8.5/8.8.8) with UUCP id QAA28317
	for FreeBSD-gnats-submit@freebsd.org; Fri, 10 Jul 1998 16:20:42 +0200 (MET DST)
Received: (from seggers@localhost)
	by semyam.dinoco.de (8.8.8/8.8.8) id NAA07005;
	Fri, 10 Jul 1998 13:07:19 +0200 (CEST)
	(envelope-from seggers)
Message-Id: <199807101107.NAA07005@semyam.dinoco.de>
Date: Fri, 10 Jul 1998 13:07:19 +0200 (CEST)
From: Stefan Eggers <seggers@semyam.dinoco.de>
Reply-To: seggers@semyam.dinoco.de
To: FreeBSD-gnats-submit@freebsd.org
Cc: seggers@semyam.dinoco.de
Subject: unnecessary code in -current VM
X-Send-Pr-Version: 3.2

>Number:         7233
>Category:       kern
>Synopsis:       unnecessary code in -current VM
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 10 07:30:01 PDT 1998
>Closed-Date:    Fri Jul 10 10:57:33 PDT 1998
>Last-Modified:  Fri Jul 10 10:59:49 PDT 1998
>Originator:     Stefan Eggers
>Release:        FreeBSD 2.2.6-STABLE i386
>Organization:
none
>Environment:

	The -current VM source.

>Description:

	While reading the VM source for -current I found an unneces-
sary test in an if/else construct.  If something is known to be not 0
it is not 0 - no need to test again.  ;-)

	It might save a few bytes in the code and also a few cycles
once in a while I think.  At least it is easier to read w/o rechecking
the condition.

>How-To-Repeat:

	N/A

>Fix:
	
Index: vm_pageout.c
===================================================================
RCS file: /usr2/FreeBSD/CVSROOT/src/sys/vm/vm_pageout.c,v
retrieving revision 1.122
diff -u -r1.122 vm_pageout.c
--- vm_pageout.c	1998/06/02 05:39:13	1.122
+++ vm_pageout.c	1998/07/10 11:00:35
@@ -722,7 +722,7 @@
 		 */
 		if (m->dirty == 0) {
 			vm_page_test_dirty(m);
-		} else if (m->dirty != 0) {
+		} else {
 			m->dirty = VM_PAGE_BITS_ALL;
 		}

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: alex 
State-Changed-When: Fri Jul 10 10:57:33 PDT 1998 
State-Changed-Why:  
Fixed in rev 1.123 of vm_pageout.c.  Thanks! 
>Unformatted:
