ram: fixed int overflow on pagetok macro - slstatus - status monitor
(HTM) git clone git://git.suckless.org/slstatus
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 5db729fedbc4b6cb8742c58ff4934afb50732974
(DIR) parent f17f39d0a2e2898177dbcf5daf67284956005b9b
(HTM) Author: Tobias Tschinkowitz <he4d@posteo.de>
Date: Thu, 24 May 2018 12:09:26 +0200
ram: fixed int overflow on pagetok macro
Diffstat:
M components/ram.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
(DIR) diff --git a/components/ram.c b/components/ram.c
@@ -75,7 +75,7 @@
#include <unistd.h>
#define LOG1024 10
- #define pagetok(size, pageshift) ((size) << (pageshift - LOG1024))
+ #define pagetok(size, pageshift) (size_t)(size << (pageshift - LOG1024))
inline int
load_uvmexp(struct uvmexp *uvmexp)