From 22a8f00229c86d76e1309bcc449b3c12f9d1599b Mon Sep 17 00:00:00 2001 From: Mike Yuan Date: Mon, 1 Jan 2024 20:41:18 +0800 Subject: [PATCH] utmp-wtmp: check actual value of bool instead of pointer --- src/shared/utmp-wtmp.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/shared/utmp-wtmp.h b/src/shared/utmp-wtmp.h index ec1e27771e9..2e04fac4047 100644 --- a/src/shared/utmp-wtmp.h +++ b/src/shared/utmp-wtmp.h @@ -23,7 +23,8 @@ static inline bool utxent_start(void) { return true; } static inline void utxent_cleanup(bool *initialized) { - if (initialized) + assert(initialized); + if (*initialized) endutxent(); } -- 2.47.3