summaryrefslogtreecommitdiff
path: root/usr.sbin/pstat
diff options
context:
space:
mode:
authorDavid Greenman <dg@FreeBSD.org>1995-05-14 03:08:35 +0000
committerDavid Greenman <dg@FreeBSD.org>1995-05-14 03:08:35 +0000
commit1295400e49199330e43498b7fbab66096db48d24 (patch)
tree5d0e197819cae19adea7c697450e1bf27d7c0649 /usr.sbin/pstat
parenta401ebbe32ec6460ae3d192e6e104efaf65d54a1 (diff)
Notes
Diffstat (limited to 'usr.sbin/pstat')
-rw-r--r--usr.sbin/pstat/pstat.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/pstat/pstat.c b/usr.sbin/pstat/pstat.c
index 3d40cb76ddb2..0b67c38ab8a6 100644
--- a/usr.sbin/pstat/pstat.c
+++ b/usr.sbin/pstat/pstat.c
@@ -1013,6 +1013,7 @@ swapmode()
long blocksize, *perdev;
struct rlist head;
struct rlist *swaplist;
+ u_long ptr;
KGET(VM_NSWAP, nswap);
KGET(VM_NSWDEV, nswdev);
@@ -1021,7 +1022,8 @@ swapmode()
if ((sw = malloc(nswdev * sizeof(*sw))) == NULL ||
(perdev = malloc(nswdev * sizeof(*perdev))) == NULL)
err(1, "malloc");
- KGET1(VM_SWDEVT, sw, nswdev * sizeof(*sw), "swdevt");
+ KGET1(VM_SWDEVT, &ptr, sizeof ptr, "swdevt");
+ KGET2(ptr, sw, nswdev * sizeof(*sw), "*swdevt");
/* Count up swap space. */
nfree = 0;