mirror of
https://github.com/systemd/systemd.git
synced 2025-03-09 12:58:26 +03:00
cryptsetup-generator: avoid magic value in ternary
`startswith` already returns the string with the prefix skipped, so we can simplify this further and avoid using a magic value. Noticed in passing. Co-authored-by: Lennart Poettering <lennart@poettering.net>
This commit is contained in:
parent
62ca7d3b38
commit
263a79642b
@ -541,7 +541,7 @@ static int parse_proc_cmdline_item(const char *key, const char *value, void *dat
|
||||
if (proc_cmdline_value_missing(key, value))
|
||||
return 0;
|
||||
|
||||
d = get_crypto_device(startswith(value, "luks-") ? value+5 : value);
|
||||
d = get_crypto_device(startswith(value, "luks-") ?: value);
|
||||
if (!d)
|
||||
return log_oom();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user