summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>2021-05-04 17:08:58 +0200
committerMarge Bot <eric+marge@anholt.net>2021-05-05 03:03:45 +0000
commit75831d5fceead7fb1b244aa1ea6b89e5be325689 (patch)
treea60aa9c9cf829336ce8d74ba6e9120989da3fb21
parent4d80ec8fcfaad3f8e29aeb1f2e07042333ebcb6b (diff)
util/math: change ROUND_DOWN_TO to return a uint64_t
For 32-bit builds. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10622>
-rw-r--r--src/util/u_math.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util/u_math.h b/src/util/u_math.h
index 567c51d7aec..11ee275617c 100644
--- a/src/util/u_math.h
+++ b/src/util/u_math.h
@@ -737,8 +737,8 @@ ALIGN_NPOT(uintptr_t value, int32_t alignment)
*
* \sa ALIGN()
*/
-static inline uintptr_t
-ROUND_DOWN_TO(uintptr_t value, int32_t alignment)
+static inline uint64_t
+ROUND_DOWN_TO(uint64_t value, int32_t alignment)
{
assert(util_is_power_of_two_nonzero(alignment));
return ((value) & ~(alignment - 1));