made function signatures more consistent to my coding style

This commit is contained in:
Anselm R. Garbe
2006-09-12 10:59:00 +02:00
parent 0e5f467aa8
commit 81bcf078f6
3 changed files with 15 additions and 30 deletions

12
util.c
View File

@ -13,16 +13,14 @@
/* static */
static void
badmalloc(unsigned int size)
{
badmalloc(unsigned int size) {
eprint("fatal: could not malloc() %u bytes\n", size);
}
/* extern */
void *
emalloc(unsigned int size)
{
emalloc(unsigned int size) {
void *res = malloc(size);
if(!res)
badmalloc(size);
@ -30,8 +28,7 @@ emalloc(unsigned int size)
}
void
eprint(const char *errstr, ...)
{
eprint(const char *errstr, ...) {
va_list ap;
va_start(ap, errstr);
@ -41,8 +38,7 @@ eprint(const char *errstr, ...)
}
char *
estrdup(const char *str)
{
estrdup(const char *str) {
void *res = strdup(str);
if(!res)
badmalloc(strlen(str));