diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2024-04-07 11:08:22 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2024-04-07 11:15:19 +0200 |
commit | 6a4607a3c8c6dcd31bed306af04b63f6f2bd2a1b (patch) | |
tree | 4d953635f852e62f1b593d0c73470ea235b4114b /src/ask-password | |
parent | core: silence gcc warning about unitialized variable (diff) | |
download | systemd-6a4607a3c8c6dcd31bed306af04b63f6f2bd2a1b.tar.xz systemd-6a4607a3c8c6dcd31bed306af04b63f6f2bd2a1b.zip |
ask-password: minor shortening
Diffstat (limited to 'src/ask-password')
-rw-r--r-- | src/ask-password/ask-password.c | 5 |
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, |