Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libkvm Redo previous more conventionally. Requested by ...



details:   https://anonhg.NetBSD.org/src/rev/12e8c5029301
branches:  trunk
changeset: 466095:12e8c5029301
user:      ad <ad%NetBSD.org@localhost>
date:      Wed Dec 11 20:19:27 2019 +0000

description:
Redo previous more conventionally.  Requested by kre@.

diffstat:

 lib/libkvm/kvm_proc.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 3ac5ca8d114e -r 12e8c5029301 lib/libkvm/kvm_proc.c
--- a/lib/libkvm/kvm_proc.c     Wed Dec 11 19:51:36 2019 +0000
+++ b/lib/libkvm/kvm_proc.c     Wed Dec 11 20:19:27 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kvm_proc.c,v 1.93 2019/12/10 18:13:07 ad Exp $ */
+/*     $NetBSD: kvm_proc.c,v 1.94 2019/12/11 20:19:27 ad Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
 #if 0
 static char sccsid[] = "@(#)kvm_proc.c 8.3 (Berkeley) 9/23/93";
 #else
-__RCSID("$NetBSD: kvm_proc.c,v 1.93 2019/12/10 18:13:07 ad Exp $");
+__RCSID("$NetBSD: kvm_proc.c,v 1.94 2019/12/11 20:19:27 ad Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -260,7 +260,7 @@
                        return (NULL);
 
                if (_kvm_pread(kd, kd->pmfd, kd->swapspc, (size_t)kd->nbpg,
-                   (off_t)pg.phys_addr & -kd->nbpg) != kd->nbpg)
+                   (off_t)pg.phys_addr & ~(kd->nbpg - 1)) != kd->nbpg)
                        return (NULL);
        } else {
                if (kd->swfd < 0 ||



Home | Main Index | Thread Index | Old Index