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:
Jonathan Lebon 2020-09-23 15:25:41 -04:00
parent 62ca7d3b38
commit 263a79642b
1 changed files with 1 additions and 1 deletions

View File

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