ソースを参照

ram: fixed int overflow on pagetok macro

Tobias Tschinkowitz 7 年 前
コミット
5db729fedb
1 ファイル変更1 行追加1 行削除
  1. 1 1
      components/ram.c

+ 1 - 1
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)