From 941a18e06a157bd94a7aa5f035844c8695389674 Mon Sep 17 00:00:00 2001 From: Ryan Pavlik Date: Tue, 18 Jun 2019 13:24:37 -0500 Subject: [PATCH] util/u_device: Use typed calloc wrapper --- src/xrt/auxiliary/util/u_device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/xrt/auxiliary/util/u_device.c b/src/xrt/auxiliary/util/u_device.c index 1449e8017..d28fa35d8 100644 --- a/src/xrt/auxiliary/util/u_device.c +++ b/src/xrt/auxiliary/util/u_device.c @@ -13,6 +13,7 @@ #include "math/m_api.h" #include "util/u_device.h" +#include "util/u_misc.h" /* @@ -242,7 +243,7 @@ u_device_allocate(enum u_device_alloc_flags flags, total_size += alloc_tracking ? sizeof(struct xrt_tracking) : 0; // Do the allocation - char* ptr = calloc(1, total_size); + char* ptr = U_TYPED_ARRAY_CALLOC(char, total_size); struct xrt_device* xdev = (struct xrt_device*)ptr; if (num_inputs > 0) {