From df1d5fc442188343ae885c89b8601476a9988bba Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Fri, 10 Mar 2017 11:30:01 +1100 Subject: glsl: don't use ralloc for blob creation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There is no need to use ralloc here. Reviewed-by: Marek Olšák --- src/compiler/glsl/blob.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/compiler/glsl/blob.c') diff --git a/src/compiler/glsl/blob.c b/src/compiler/glsl/blob.c index 14dc69092f0..769ebf1a023 100644 --- a/src/compiler/glsl/blob.c +++ b/src/compiler/glsl/blob.c @@ -24,7 +24,6 @@ #include #include "main/macros.h" -#include "util/ralloc.h" #include "blob.h" #define BLOB_INITIAL_SIZE 4096 @@ -49,7 +48,7 @@ grow_to_fit(struct blob *blob, size_t additional) to_allocate = MAX2(to_allocate, blob->allocated + additional); - new_data = reralloc_size(blob, blob->data, to_allocate); + new_data = realloc(blob->data, to_allocate); if (new_data == NULL) return false; @@ -88,11 +87,9 @@ align_blob_reader(struct blob_reader *blob, size_t alignment) } struct blob * -blob_create(void *mem_ctx) +blob_create() { - struct blob *blob; - - blob = ralloc(mem_ctx, struct blob); + struct blob *blob = (struct blob *) malloc(sizeof(struct blob)); if (blob == NULL) return NULL; -- cgit v1.2.3