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-24 11:19:40 -04:00
co-authored by Lennart Poettering
parent 62ca7d3b38
commit 263a79642b
+1 -1
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();