From d54deae0ade24f6e2939c0d27285fa886c1f381f Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Mon, 25 Sep 2023 18:28:50 +0200 Subject: [PATCH] debug: correcting check for error Correct trace for erroring case of close. --- lib/log/log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/log/log.c b/lib/log/log.c index b654737f1..d6a5e0f7e 100644 --- a/lib/log/log.c +++ b/lib/log/log.c @@ -234,7 +234,7 @@ static int _get_pid_starttime(int *pid, unsigned long long *starttime) if ((e = read(fd, buf, sizeof(buf) - 1)) <= 0) log_sys_debug("read", statfile); - if (!close(fd)) + if (close(fd)) log_sys_debug("close", statfile); if (e <= 0)