sync code-style patch from libsl

main
Hiltjo Posthuma 2022-08-08 10:42:54 +02:00 committed by Chewing_Bever
parent 78e64ffb9c
commit 16524400dc
Signed by: Jef Roosens
GPG Key ID: B75D4F293C7052DB
1 changed files with 12 additions and 11 deletions

23
util.c
View File

@ -6,18 +6,9 @@
#include "util.h"
void *
ecalloc(size_t nmemb, size_t size)
{
void *p;
if (!(p = calloc(nmemb, size)))
die("calloc:");
return p;
}
void
die(const char *fmt, ...) {
die(const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
@ -33,3 +24,13 @@ die(const char *fmt, ...) {
exit(1);
}
void *
ecalloc(size_t nmemb, size_t size)
{
void *p;
if (!(p = calloc(nmemb, size)))
die("calloc:");
return p;
}