sort util.c functions

This commit is contained in:
Leonardo Hernández Hernández 2022-10-29 14:55:03 -05:00
parent f494891a9a
commit 2f7834b130
No known key found for this signature in database
GPG Key ID: E538897EE11B9624
1 changed files with 10 additions and 10 deletions

20
util.c
View File

@ -6,16 +6,6 @@
#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, ...) {
va_list ap;
@ -33,3 +23,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;
}