aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm
diff options
context:
space:
mode:
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/drm_mem_util.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/drm/drm_mem_util.h b/include/drm/drm_mem_util.h
index 6bd325fedc87..19a240446fca 100644
--- a/include/drm/drm_mem_util.h
+++ b/include/drm/drm_mem_util.h
@@ -31,7 +31,7 @@
31 31
32static __inline__ void *drm_calloc_large(size_t nmemb, size_t size) 32static __inline__ void *drm_calloc_large(size_t nmemb, size_t size)
33{ 33{
34 if (size != 0 && nmemb > ULONG_MAX / size) 34 if (size != 0 && nmemb > SIZE_MAX / size)
35 return NULL; 35 return NULL;
36 36
37 if (size * nmemb <= PAGE_SIZE) 37 if (size * nmemb <= PAGE_SIZE)
@@ -44,7 +44,7 @@ static __inline__ void *drm_calloc_large(size_t nmemb, size_t size)
44/* Modeled after cairo's malloc_ab, it's like calloc but without the zeroing. */ 44/* Modeled after cairo's malloc_ab, it's like calloc but without the zeroing. */
45static __inline__ void *drm_malloc_ab(size_t nmemb, size_t size) 45static __inline__ void *drm_malloc_ab(size_t nmemb, size_t size)
46{ 46{
47 if (size != 0 && nmemb > ULONG_MAX / size) 47 if (size != 0 && nmemb > SIZE_MAX / size)
48 return NULL; 48 return NULL;
49 49
50 if (size * nmemb <= PAGE_SIZE) 50 if (size * nmemb <= PAGE_SIZE)