From 871bd2819d51bf9720d2ff57522ec31f254431a5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Wed, 25 Mar 2020 23:47:36 -0400 Subject: [PATCH] util: remove duplicated MALLOC_STRUCT and CALLOC_STRUCT Reviewed-by: Timothy Arceri Part-of: --- src/util/imports.h | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/util/imports.h b/src/util/imports.h index 1e547c3a787..4ebae04ffc7 100644 --- a/src/util/imports.h +++ b/src/util/imports.h @@ -41,24 +41,13 @@ #include #include "util/compiler.h" #include "util/bitscan.h" +#include "util/u_memory.h" #ifdef __cplusplus extern "C" { #endif -/**********************************************************************/ -/** Memory macros */ -/*@{*/ - -/** Allocate a structure of type \p T */ -#define MALLOC_STRUCT(T) (struct T *) malloc(sizeof(struct T)) -/** Allocate and zero a structure of type \p T */ -#define CALLOC_STRUCT(T) (struct T *) calloc(1, sizeof(struct T)) - -/*@}*/ - - /* * For GL_ARB_vertex_buffer_object we need to treat vertex array pointers * as offsets into buffer stores. Since the vertex array pointer and -- 2.30.2