diff options
author | 2008-02-17 20:33:47 +0000 | |
---|---|---|
committer | 2008-02-17 20:33:47 +0000 | |
commit | db039a030aa3fa98061472499f0773d1e4eec45f (patch) | |
tree | fd95c687693916b9e9fe8107398a99eaa6732a49 | |
parent | Remove the check for non-production bnx(4) chipsets. These chipsets are (diff) | |
download | wireguard-openbsd-db039a030aa3fa98061472499f0773d1e4eec45f.tar.xz wireguard-openbsd-db039a030aa3fa98061472499f0773d1e4eec45f.zip |
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@
-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 |