From owner-freebsd-bugs Fri Jul 10 07:30:11 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA17484 for freebsd-bugs-outgoing; Fri, 10 Jul 1998 07:30:11 -0700 (PDT) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA17444 for ; Fri, 10 Jul 1998 07:30:04 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id HAA05708; Fri, 10 Jul 1998 07:30:01 -0700 (PDT) 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 ; 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 Reply-To: seggers@semyam.dinoco.de To: FreeBSD-gnats-submit@FreeBSD.ORG Cc: seggers@semyam.dinoco.de X-Send-Pr-Version: 3.2 Subject: kern/7233: unnecessary code in -current VM Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 7233 >Category: kern >Synopsis: unnecessary code in -current VM >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Jul 10 07:30:01 PDT 1998 >Last-Modified: >Originator: Stefan Eggers >Organization: none >Release: FreeBSD 2.2.6-STABLE i386 >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; } >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message