summaryrefslogtreecommitdiffstats
path: root/src/ask-password/ask-password.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ask-password/ask-password.c')
-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,