diff options
author | Axel Davy <[email protected]> | 2016-10-11 18:57:17 +0200 |
---|---|---|
committer | Axel Davy <[email protected]> | 2016-10-13 21:16:35 +0200 |
commit | 197cdd1bbdafaf44dc705e518987a08953b092ab (patch) | |
tree | 4f12c1eb710703b7e1a67b19d3569b3d2a2ee786 | |
parent | 452722216954c95f0a8ca1f2a610185ae0bd2a63 (diff) |
gallium/os: Use unsigned integers for size computation
Use uint64_t instead of int64_t in the calculation,
as the result is uint64_t.
Signed-off-by: Axel Davy <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
-rw-r--r-- | src/gallium/auxiliary/os/os_misc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/os/os_misc.c b/src/gallium/auxiliary/os/os_misc.c index a32a9e594b8..09d4400e082 100644 --- a/src/gallium/auxiliary/os/os_misc.c +++ b/src/gallium/auxiliary/os/os_misc.c @@ -131,7 +131,7 @@ os_get_total_physical_memory(uint64_t *size) if (phys_pages <= 0 || page_size <= 0) return false; - *size = (int64_t)phys_pages * (int64_t)page_size; + *size = (uint64_t)phys_pages * (uint64_t)page_size; return true; #elif defined(PIPE_OS_APPLE) || defined(PIPE_OS_BSD) size_t len = sizeof(*size); @@ -159,7 +159,7 @@ os_get_total_physical_memory(uint64_t *size) if (ret != B_OK || info.max_pages <= 0) return false; - *size = (int64_t)info.max_pages * (int64_t)B_PAGE_SIZE; + *size = (uint64_t)info.max_pages * (uint64_t)B_PAGE_SIZE; return true; #elif defined(PIPE_OS_WINDOWS) MEMORYSTATUSEX status; |