Date: Fri, 10 Jul 1998 13:07:19 +0200 (CEST) From: Stefan Eggers <seggers@semyam.dinoco.de> To: FreeBSD-gnats-submit@FreeBSD.ORG Cc: seggers@semyam.dinoco.de Subject: kern/7233: unnecessary code in -current VM Message-ID: <199807101107.NAA07005@semyam.dinoco.de>
next in thread | raw e-mail | index | archive | help
>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199807101107.NAA07005>