speediegq 2022-09-11 00:47:48 +02:00
parent b327178b1a
commit 93a397c024

23
util.c
View file

@ -11,18 +11,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);
@ -39,6 +30,16 @@ 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;
}
#if USEIPC
int
normalizepath(const char *path, char **normal)