mojoshader_opengl.c
changeset 1188 25000edc0176
parent 1182 179ffe99c57f
child 1192 706e4d246ca1
--- a/mojoshader_opengl.c	Thu May 17 13:05:09 2018 -0400
+++ b/mojoshader_opengl.c	Wed May 23 11:07:59 2018 -0400
@@ -347,10 +347,9 @@
     set_error("out of memory");
 } // out_of_memory
 
-static char zeromalloc = 0;
 static inline void *Malloc(const size_t len)
 {
-    void *retval = (len == 0) ? &zeromalloc : ctx->malloc_fn((int) len, ctx->malloc_data);
+    void *retval = ctx->malloc_fn((int) len, ctx->malloc_data);
     if (retval == NULL)
         out_of_memory();
     return retval;
@@ -358,7 +357,7 @@
 
 static inline void Free(void *ptr)
 {
-    if ((ptr != &zeromalloc) && (ptr != NULL))
+    if (ptr != NULL)
         ctx->free_fn(ptr, ctx->malloc_data);
 } // Free