aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/blob.c
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-03-10 11:30:01 +1100
committerTimothy Arceri <[email protected]>2017-03-13 09:50:19 +1100
commitdf1d5fc442188343ae885c89b8601476a9988bba (patch)
treede371f43cb58f48868f6b74b3f9ecf36a4c45481 /src/compiler/glsl/blob.c
parentca76a2ba1b83ca837a198dc58ef3962d1ca71c68 (diff)
glsl: don't use ralloc for blob creation
There is no need to use ralloc here. Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/compiler/glsl/blob.c')
-rw-r--r--src/compiler/glsl/blob.c9
1 files changed, 3 insertions, 6 deletions
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 <string.h>
#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;