From ec725c0c498c3db7fbe910c6593b342ad2369904 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Fri, 6 May 2022 14:38:16 +0200 Subject: [PATCH] shared/bootspec: add one more assert All callers assume that boot_entry_title() always returns something. It will, as long as it's not called on an uninitialized entry. --- src/shared/bootspec.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/bootspec.h b/src/shared/bootspec.h index 93fb22e9d4..56e06f6be9 100644 --- a/src/shared/bootspec.h +++ b/src/shared/bootspec.h @@ -92,5 +92,5 @@ int boot_config_select_special_entries(BootConfig *config); static inline const char* boot_entry_title(const BootEntry *entry) { assert(entry); - return entry->show_title ?: entry->title ?: entry->id; + return ASSERT_PTR(entry->show_title ?: entry->title ?: entry->id); } -- 2.25.1