From: Mike Yuan Date: Mon, 1 Jan 2024 12:41:18 +0000 (+0800) Subject: utmp-wtmp: check actual value of bool instead of pointer X-Git-Tag: v256-rc1~1355 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=22a8f00229c86d76e1309bcc449b3c12f9d1599b;p=thirdparty%2Fsystemd.git utmp-wtmp: check actual value of bool instead of pointer --- 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(); }