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.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2022-05-06 14:38:16 +02:00
parent 91da36f195
commit ec725c0c49

View File

@@ -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);
}