diff th_util.c @ 194:87dac812cac4

Define some argument identifiers in function prototypes and rename some arguments.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 11 Feb 2016 16:42:00 +0200
parents 7d25d43a3ce2
children a16e8272bdda
line wrap: on
line diff
--- a/th_util.c	Thu Feb 11 16:22:52 2016 +0200
+++ b/th_util.c	Thu Feb 11 16:42:00 2016 +0200
@@ -218,27 +218,27 @@
 }
 
 
-void *th_realloc(void *p, size_t l)
+void *th_realloc(void *ptr, size_t l)
 {
-    return realloc(p, l);
+    return realloc(ptr, l);
 }
 
 
-void th_free(void *p)
+void th_free(void *ptr)
 {
     /* Check for NULL pointers for portability due to some libc
      * implementations not handling free(NULL) too well.
      */
-    if (p) free(p);
+    if (ptr != NULL) free(ptr);
 }
 
 
-void th_free_r(void **p)
+void th_free_r(void **ptr)
 {
     if (p != NULL)
     {
-        th_free(*p);
-        *p = NULL;
+        th_free(*ptr);
+        *ptr = NULL;
     }
 }