Explorar el Código

ram: fixed int overflow on pagetok macro

Tobias Tschinkowitz hace 7 años
padre
commit
5db729fedb
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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)