ask-password: minor shortening

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2024-04-07 11:08:22 +02:00
parent 741f6ae39b
commit 6a4607a3c8

View file

@ -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,