git: db0372808ad7 - main - rtld trace_loaded_objects(): use bool for the list_containers variable

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Fri, 01 Apr 2022 00:51:31 UTC
The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=db0372808ad7575bd467049daa25a4415c6b2bab

commit db0372808ad7575bd467049daa25a4415c6b2bab
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2022-03-30 22:17:59 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2022-04-01 00:51:22 +0000

    rtld trace_loaded_objects(): use bool for the list_containers variable
    
    Reviewed by:    markj
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Differential revision:  https://reviews.freebsd.org/D34716
---
 libexec/rtld-elf/rtld.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c
index becfe49e4531..3860e1dba3eb 100644
--- a/libexec/rtld-elf/rtld.c
+++ b/libexec/rtld-elf/rtld.c
@@ -4994,10 +4994,11 @@ trace_print_obj(Obj_Entry *obj, const char *name, const char *path,
 static void
 trace_loaded_objects(Obj_Entry *obj)
 {
-	const char *fmt1, *fmt2, *main_local, *list_containers;
+	const char *fmt1, *fmt2, *main_local;
+	bool list_containers;
 
 	trace_calc_fmts(&main_local, &fmt1, &fmt2);
-	list_containers = ld_get_env_var(LD_TRACE_LOADED_OBJECTS_ALL);
+	list_containers = ld_get_env_var(LD_TRACE_LOADED_OBJECTS_ALL) != NULL;
 
 	for (; obj != NULL; obj = TAILQ_NEXT(obj, next)) {
 		Needed_Entry *needed;