summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2022-10-17 00:14:21 +0200
committerLennart Poettering <lennart@poettering.net>2022-10-17 13:52:54 +0200
commit714c586943d78c1a7565dad2d783402275530ae7 (patch)
treed3a30e8781e2db6f9b3439bc501d45d4e65f93e5
parentMerge pull request #24919 from anitazha/varlinkserialize (diff)
downloadsystemd-714c586943d78c1a7565dad2d783402275530ae7.tar.xz
systemd-714c586943d78c1a7565dad2d783402275530ae7.zip
cryptsetup: drop redundant parens/drop ternary op
A ternary op is a bit weird to use if we end up assigning a variable to itself in one of the branches. Hence use a plain if check.
-rw-r--r--src/cryptsetup/cryptsetup.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c
index 03b85359a5..9405dc787b 100644
--- a/src/cryptsetup/cryptsetup.c
+++ b/src/cryptsetup/cryptsetup.c
@@ -1988,7 +1988,8 @@ static int run(int argc, char *argv[]) {
if (until == USEC_INFINITY)
until = 0;
- arg_key_size = (arg_key_size > 0 ? arg_key_size : (256 / 8));
+ if (arg_key_size == 0)
+ arg_key_size = 256U / 8U;
if (key_file) {
struct stat st;