From: Ralph Corderoy Date: Sun, 16 Oct 2016 17:24:51 +0000 (+0100) Subject: Put parameter names in h/utils.h memory function prototypes. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/34f0ab116ad7734e96127d3cd046861a5c82c11c Put parameter names in h/utils.h memory function prototypes. 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. --- diff --git a/h/utils.h b/h/utils.h index 95cae88c..4ae2f247 100644 --- 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);