projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
91da36f
)
shared/bootspec: add one more assert
author
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Fri, 6 May 2022 12:38:16 +0000
(14:38 +0200)
committer
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Sun, 8 May 2022 15:53:56 +0000
(17:53 +0200)
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
patch
|
blob
|
history
diff --git
a/src/shared/bootspec.h
b/src/shared/bootspec.h
index 93fb22e9d406c972ed2f75d690a9eb0f3adb9a8d..56e06f6be9a7a202df21b283103572995d51a7ca 100644
(file)
--- 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)
;
}