From 93b8646855353ab3adfe5fea8ccb5b0842ad8a0d Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Fri, 26 Aug 2022 07:15:03 +0200 Subject: add check_errno macro --- src/worker_queue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/worker_queue.c') diff --git a/src/worker_queue.c b/src/worker_queue.c index bb0077b..c832746 100644 --- a/src/worker_queue.c +++ b/src/worker_queue.c @@ -24,14 +24,14 @@ int worker_queue_entry_create(struct worker_queue_entry **entry, int fd) return 0; close_newfd: - close(newfd); + check_errno(close(newfd), "close"); return -1; } void worker_queue_entry_destroy(struct worker_queue_entry *entry) { - close(entry->fd); + check_errno(close(entry->fd), "close"); free(entry); } -- cgit v1.2.3