diff options
author | ed <ed@FreeBSD.org> | 2009-12-29 22:53:27 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2009-12-29 22:53:27 +0000 |
commit | b9ca89bfc495774b5fe49e23a272c721c840f68b (patch) | |
tree | 2e35e76a520e919173f604f9ba0f30358443ed4a /sbin/rcorder/ealloc.c | |
parent | 86ca9a5a9bdaa4a662de58157f311ce58029b75a (diff) | |
download | FreeBSD-src-b9ca89bfc495774b5fe49e23a272c721c840f68b.zip FreeBSD-src-b9ca89bfc495774b5fe49e23a272c721c840f68b.tar.gz |
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.
Diffstat (limited to 'sbin/rcorder/ealloc.c')
-rw-r--r-- | sbin/rcorder/ealloc.c | 16 |
1 files changed, 5 insertions, 11 deletions
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; |