From 6a4607a3c8c6dcd31bed306af04b63f6f2bd2a1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sun, 7 Apr 2024 11:08:22 +0200 Subject: [PATCH] ask-password: minor shortening --- src/ask-password/ask-password.c | 5 +---- 1 file changed, 1 insertion(+), 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,