From c9af6f92db9f760e0b03a75bf688439e4aeab231 Mon Sep 17 00:00:00 2001 From: Laine Stump Date: Wed, 15 Feb 2023 03:24:37 -0500 Subject: convert all remaining err() followed by exit() to die() This actually leaves us with 0 uses of err(), but someone could want to use it in the future, so we may as well leave it around. Signed-off-by: Laine Stump Signed-off-by: Stefano Brivio --- log.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'log.c') diff --git a/log.c b/log.c index 2920aba..785bc36 100644 --- a/log.c +++ b/log.c @@ -193,10 +193,8 @@ void logfile_init(const char *name, const char *path, size_t size) log_file = open(path, O_CREAT | O_TRUNC | O_APPEND | O_RDWR | O_CLOEXEC, S_IRUSR | S_IWUSR); - if (log_file == -1) { - err("Couldn't open log file %s: %s", path, strerror(errno)); - exit(EXIT_FAILURE); - } + if (log_file == -1) + die("Couldn't open log file %s: %s", path, strerror(errno)); log_size = size ? size : LOGFILE_SIZE_DEFAULT; -- cgit v1.2.3