Commit 941a18e0 authored by Ryan Pavlik's avatar Ryan Pavlik Committed by Jakob Bornecrantz
Browse files

util/u_device: Use typed calloc wrapper

parent fbfee926
Pipeline #43424 passed with stages
in 38 seconds
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include "math/m_api.h" #include "math/m_api.h"
#include "util/u_device.h" #include "util/u_device.h"
#include "util/u_misc.h"
/* /*
...@@ -242,7 +243,7 @@ u_device_allocate(enum u_device_alloc_flags flags, ...@@ -242,7 +243,7 @@ u_device_allocate(enum u_device_alloc_flags flags,
total_size += alloc_tracking ? sizeof(struct xrt_tracking) : 0; total_size += alloc_tracking ? sizeof(struct xrt_tracking) : 0;
// Do the allocation // 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; struct xrt_device* xdev = (struct xrt_device*)ptr;
if (num_inputs > 0) { if (num_inputs > 0) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment