summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2008-12-02 10:10:50 +0000
committerPeter Wemm <peter@FreeBSD.org>2008-12-02 10:10:50 +0000
commitde94a63bd15027219f5054451f96a81387c19c59 (patch)
tree3e262a33e020803c298c16eb875d8247fa53b01a
parentf3c713fdafee8aed071b5f9ef4c1a1b2e6747f8d (diff)
Notes
-rw-r--r--lib/libutil/kinfo_getfile.c4
-rw-r--r--lib/libutil/kinfo_getvmmap.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/libutil/kinfo_getfile.c b/lib/libutil/kinfo_getfile.c
index de68961aa9bf8..ca0f832f1829b 100644
--- a/lib/libutil/kinfo_getfile.c
+++ b/lib/libutil/kinfo_getfile.c
@@ -42,7 +42,7 @@ kinfo_getfile(pid_t pid, int *cntp)
bp = buf;
eb = buf + len;
while (bp < eb) {
- kf = (struct kinfo_file *)bp;
+ kf = (struct kinfo_file *)(uintptr_t)bp;
bp += kf->kf_structsize;
cnt++;
}
@@ -57,7 +57,7 @@ kinfo_getfile(pid_t pid, int *cntp)
kp = kif;
/* Pass 2: unpack */
while (bp < eb) {
- kf = (struct kinfo_file *)bp;
+ kf = (struct kinfo_file *)(uintptr_t)bp;
/* Copy/expand into pre-zeroed buffer */
memcpy(kp, kf, kf->kf_structsize);
/* Advance to next packed record */
diff --git a/lib/libutil/kinfo_getvmmap.c b/lib/libutil/kinfo_getvmmap.c
index b5e7c968d99f2..54361089a599a 100644
--- a/lib/libutil/kinfo_getvmmap.c
+++ b/lib/libutil/kinfo_getvmmap.c
@@ -42,7 +42,7 @@ kinfo_getvmmap(pid_t pid, int *cntp)
bp = buf;
eb = buf + len;
while (bp < eb) {
- kv = (struct kinfo_vmentry *)bp;
+ kv = (struct kinfo_vmentry *)(uintptr_t)bp;
bp += kv->kve_structsize;
cnt++;
}
@@ -57,7 +57,7 @@ kinfo_getvmmap(pid_t pid, int *cntp)
kp = kiv;
/* Pass 2: unpack */
while (bp < eb) {
- kv = (struct kinfo_vmentry *)bp;
+ kv = (struct kinfo_vmentry *)(uintptr_t)bp;
/* Copy/expand into pre-zeroed buffer */
memcpy(kp, kv, kv->kve_structsize);
/* Advance to next packed record */