trigger: use uloop_timeout_remaining64
authorStijn Tintel <stijn@linux-ipv6.be>
Thu, 4 Nov 2021 10:37:10 +0000 (12:37 +0200)
committerStijn Tintel <stijn@linux-ipv6.be>
Thu, 4 Nov 2021 12:59:48 +0000 (14:59 +0200)
The uloop_timeout_remaining function is being deprecated.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Acked-by: Jo-Philipp Wich <jo@mein.io>
service/trigger.c

index 440830b26b72ff9afeac701cdd1fb89c6234ef58..4af1474ae5f0ee81e0bf56e34a68a9911658d358 100644 (file)
@@ -155,7 +155,7 @@ static void trigger_command_start(struct uloop_timeout *timeout)
 static void trigger_command_add(struct trigger *t, struct blob_attr *data)
 {
        struct trigger_command *cmd;
-       int remaining;
+       int64_t remaining;
 
        cmd = avl_find_element(&trigger_pending, data, cmd, avl);
        if (cmd) {
@@ -166,7 +166,7 @@ static void trigger_command_add(struct trigger *t, struct blob_attr *data)
                }
 
                /* Extend timer if trigger timeout is bigger than remaining time */
-               remaining = uloop_timeout_remaining(&cmd->delay);
+               remaining = uloop_timeout_remaining64(&cmd->delay);
                if (remaining < t->timeout)
                        uloop_timeout_set(&cmd->delay, t->timeout);