]> diplodocus.org Git - nmh/blobdiff - sbr/utils.c
Don't need to cast to `char *' for free(3) these days.
[nmh] / sbr / utils.c
index fbada4e6aa54d46c7ae4c6be436ea2ed7a3a0313..f5f2057032e3d1cf0afa2991ecf736e8a226a11b 100644 (file)
@@ -46,9 +46,7 @@ void *mh_xrealloc(void *ptr, size_t size)
 
     /* Copy POSIX behaviour, coping with non-POSIX systems. */
     if (size == 0) {
-        if (ptr) {
-            free(ptr);
-        }
+        mh_xfree(ptr);
         return mh_xmalloc(1); /* Get a unique pointer. */
     }
     if (!ptr)