From owner-freebsd-bugs Mon Aug 3 07:20:07 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA00746 for freebsd-bugs-outgoing; Mon, 3 Aug 1998 07:20:07 -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 HAA00684 for ; Mon, 3 Aug 1998 07:20:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id HAA17971; Mon, 3 Aug 1998 07:20: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 HAA29320 for ; Mon, 3 Aug 1998 07:13:36 -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 QAA08238 for FreeBSD-gnats-submit@freebsd.org; Mon, 3 Aug 1998 16:08:17 +0200 (MET DST) Received: (from seggers@localhost) by semyam.dinoco.de (8.8.8/8.8.8) id LAA08621; Mon, 3 Aug 1998 11:49:58 +0200 (CEST) (envelope-from seggers) Message-Id: <199808030949.LAA08621@semyam.dinoco.de> Date: Mon, 3 Aug 1998 11:49:58 +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/7482: nonsense-code in kern_subr.c Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 7482 >Category: kern >Synopsis: nonsense-code in kern_subr.c >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: Mon Aug 3 07:20:00 PDT 1998 >Last-Modified: >Originator: Stefan Eggers >Organization: none >Release: FreeBSD 3.0-CURRENT i386 >Environment: -current cvsup'ed last Friday. >Description: Look at the code from kern/kern_subr.c below. It sets cnt to the value of tcnt when they differ. If they don't differ this is a noop. This can be simplified like you see in the patch. Makes this code easier to read. >How-To-Repeat: N/A >Fix: --- kern_subr.c.ORIG Sun Jul 19 11:37:57 1998 +++ kern_subr.c Mon Aug 3 11:46:09 1998 @@ -224,9 +224,7 @@ break; tcnt = npagesmoved * PAGE_SIZE; - if (tcnt != cnt) { - cnt = tcnt; - } + cnt = tcnt; if (error) break; >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message