From seggers@semyam.dinoco.de  Mon Aug  3 07:13:38 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 HAA29320
          for <FreeBSD-gnats-submit@freebsd.org>; 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 <seggers@semyam.dinoco.de>
Reply-To: seggers@semyam.dinoco.de
To: FreeBSD-gnats-submit@freebsd.org
Cc: seggers@semyam.dinoco.de
Subject: nonsense-code in kern_subr.c
X-Send-Pr-Version: 3.2

>Number:         7482
>Category:       kern
>Synopsis:       nonsense-code in kern_subr.c
>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:   Mon Aug  3 07:20:00 PDT 1998
>Closed-Date:    Tue Aug 4 02:21:14 PDT 1998
>Last-Modified:  Tue Aug  4 02:21:30 PDT 1998
>Originator:     Stefan Eggers
>Release:        FreeBSD 3.0-CURRENT i386
>Organization:
none
>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;
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: phk 
State-Changed-When: Tue Aug 4 02:21:14 PDT 1998 
State-Changed-Why:  
fixed, thanks! 
>Unformatted:
