From b9ca89bfc495774b5fe49e23a272c721c840f68b Mon Sep 17 00:00:00 2001 From: ed Date: Tue, 29 Dec 2009 22:53:27 +0000 Subject: ANSIfy almost all applications that use WARNS=6. I was considering committing all these patches one by one, but as discussed with brooks@, there is no need to do this. If we ever need/want to merge these changes back, it is still possible to do this per application. --- sbin/rcorder/ealloc.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'sbin/rcorder/ealloc.c') diff --git a/sbin/rcorder/ealloc.c b/sbin/rcorder/ealloc.c index a7cf6bc..9971193 100644 --- a/sbin/rcorder/ealloc.c +++ b/sbin/rcorder/ealloc.c @@ -58,7 +58,7 @@ static void enomem(void); * die when out of memory. */ static void -enomem() +enomem(void) { errx(2, "Cannot allocate memory."); } @@ -68,8 +68,7 @@ enomem() * malloc, but die on error. */ void * -emalloc(len) - size_t len; +emalloc(size_t len) { void *p; @@ -83,8 +82,7 @@ emalloc(len) * strdup, but die on error. */ char * -estrdup(str) - const char *str; +estrdup(const char *str) { char *p; @@ -98,9 +96,7 @@ estrdup(str) * realloc, but die on error. */ void * -erealloc(ptr, size) - void *ptr; - size_t size; +erealloc(void *ptr, size_t size) { if ((ptr = realloc(ptr, size)) == NULL) enomem(); @@ -112,9 +108,7 @@ erealloc(ptr, size) * calloc, but die on error. */ void * -ecalloc(nmemb, size) - size_t nmemb; - size_t size; +ecalloc(size_t nmemb, size_t size) { void *ptr; -- cgit v1.1