diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2008-02-17 20:33:48 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2008-02-17 20:33:48 +0000 |
commit | 6db56940279e7a6e3351ea37a2347697f3b3c552 (patch) | |
tree | e78966d5ff544205fa9f4207c0d5a0d511805a24 /sys | |
parent | 135bd050e371eaaaf4073252e7fe461e6ca4c070 (diff) |
Add back cast in ptoa() to prevent problems with integer overflow.
Proper casts should be added to all invocations of ptoa() before this cast
can be removed again.
ok toby@, marco@, miod@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/uvm/uvm_param.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/uvm/uvm_param.h b/sys/uvm/uvm_param.h index 91e41bf2013..392ffaf72d6 100644 --- a/sys/uvm/uvm_param.h +++ b/sys/uvm/uvm_param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_param.h,v 1.13 2007/12/15 03:42:57 deraadt Exp $ */ +/* $OpenBSD: uvm_param.h,v 1.14 2008/02/17 20:33:47 kettenis Exp $ */ /* $NetBSD: uvm_param.h,v 1.5 2001/03/09 01:02:12 chs Exp $ */ /* @@ -144,7 +144,7 @@ struct _ps_strings { */ #ifdef _KERNEL #define atop(x) ((x) >> PAGE_SHIFT) -#define ptoa(x) ((x) << PAGE_SHIFT) +#define ptoa(x) ((paddr_t)(x) << PAGE_SHIFT) /* * Round off or truncate to the nearest page. These will work |