summaryrefslogtreecommitdiffstats
path: root/src/ref.c
diff options
context:
space:
mode:
authorLouis Burda <quent.burda@gmail.com>2023-01-12 15:50:56 +0100
committerLouis Burda <quent.burda@gmail.com>2023-01-12 15:50:56 +0100
commit099002715d30af646d4582ac2b14322dae3f04d9 (patch)
tree459d79b4e9121e5b6d84eea757cc17400366f075 /src/ref.c
parent44070fb5518e2b54748d58da5a5c61f476ef8700 (diff)
downloadtmus-099002715d30af646d4582ac2b14322dae3f04d9.tar.gz
tmus-099002715d30af646d4582ac2b14322dae3f04d9.zip
Refactor error handling
Diffstat (limited to 'src/ref.c')
-rw-r--r--src/ref.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/ref.c b/src/ref.c
index 5c98df0..4960852 100644
--- a/src/ref.c
+++ b/src/ref.c
@@ -1,15 +1,13 @@
#include "ref.h"
#include "util.h"
-#include <err.h>
-
struct ref *
ref_alloc(void *data)
{
struct ref *ref;
ref = malloc(sizeof(struct ref));
- if (!ref) err(1, "malloc");
+ if (!ref) ERROR(SYSTEM, "malloc");
ref->link = LINK_EMPTY;
ref->data = data;