diff options
| author | Louis Burda <quent.burda@gmail.com> | 2023-01-12 15:50:56 +0100 |
|---|---|---|
| committer | Louis Burda <quent.burda@gmail.com> | 2023-01-12 15:50:56 +0100 |
| commit | 099002715d30af646d4582ac2b14322dae3f04d9 (patch) | |
| tree | 459d79b4e9121e5b6d84eea757cc17400366f075 /src/ref.c | |
| parent | 44070fb5518e2b54748d58da5a5c61f476ef8700 (diff) | |
| download | tmus-099002715d30af646d4582ac2b14322dae3f04d9.tar.gz tmus-099002715d30af646d4582ac2b14322dae3f04d9.zip | |
Refactor error handling
Diffstat (limited to 'src/ref.c')
| -rw-r--r-- | src/ref.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -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; |
