gralloc: Fix integer overflow in roundUpToPageSize
- Changed the input and return value from integer to size_t in roundUpToPageSize Change-Id: I526b90d3d85cd263b1a4dd524bd3e759ff0fd491
This commit is contained in:
@@ -73,7 +73,7 @@
|
||||
#define USE_SYSTEM_HEAP_FOR_SENSORS GRALLOC_PROP("use_system_heap_for_sensors")
|
||||
|
||||
#define ROUND_UP_PAGESIZE(x) roundUpToPageSize(x)
|
||||
inline int roundUpToPageSize(int x) {
|
||||
inline size_t roundUpToPageSize(size_t x) {
|
||||
return (x + (getpagesize() - 1)) & ~(getpagesize() - 1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user