]> diplodocus.org Git - nmh/commitdiff
Put parameter names in h/utils.h memory function prototypes.
authorRalph Corderoy <ralph@inputplus.co.uk>
Sun, 16 Oct 2016 17:24:51 +0000 (18:24 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Sun, 16 Oct 2016 17:24:51 +0000 (18:24 +0100)
It can be a problem if there is a system creeps in a clashing macro,
e.g. `size', but that's unlikely and I think the documentation benefits.

h/utils.h

index 95cae88..4ae2f24 100644 (file)
--- a/h/utils.h
+++ b/h/utils.h
@@ -4,13 +4,13 @@
  */
 
 /* Call malloc(3), exiting on NULL return. */
-void *mh_xmalloc(size_t);
+void *mh_xmalloc(size_t size);
 
 /* Call realloc(3), exiting on NULL return. */
-void *mh_xrealloc(void *, size_t);
+void *mh_xrealloc(void *ptr, size_t size);
 
 /* Call calloc(3), exiting on NULL return. */
-void *mh_xcalloc(size_t, size_t);
+void *mh_xcalloc(size_t nelem, size_t elsize);
 
 /* Call free(3), if ptr isn't NULL. */
 void mh_xfree(void *ptr);