summaryrefslogtreecommitdiffstats
path: root/src/ask-password
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2024-04-07 11:08:22 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2024-04-07 11:15:19 +0200
commit6a4607a3c8c6dcd31bed306af04b63f6f2bd2a1b (patch)
tree4d953635f852e62f1b593d0c73470ea235b4114b /src/ask-password
parentcore: silence gcc warning about unitialized variable (diff)
downloadsystemd-6a4607a3c8c6dcd31bed306af04b63f6f2bd2a1b.tar.xz
systemd-6a4607a3c8c6dcd31bed306af04b63f6f2bd2a1b.zip
ask-password: minor shortening
Diffstat (limited to 'src/ask-password')
-rw-r--r--src/ask-password/ask-password.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/ask-password/ask-password.c b/src/ask-password/ask-password.c
index 371d316332..20285a7227 100644
--- a/src/ask-password/ask-password.c
+++ b/src/ask-password/ask-password.c
@@ -234,10 +234,7 @@ static int run(int argc, char *argv[]) {
if (r <= 0)
return r;
- if (arg_timeout > 0)
- timeout = usec_add(now(CLOCK_MONOTONIC), arg_timeout);
- else
- timeout = 0;
+ timeout = arg_timeout > 0 ? usec_add(now(CLOCK_MONOTONIC), arg_timeout) : 0;
AskPasswordRequest req = {
.message = arg_message,