]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
ip route: Print expires as signed int
authorDavid Ahern <dsahern@gmail.com>
Wed, 23 May 2018 18:50:01 +0000 (11:50 -0700)
committerStephen Hemminger <stephen@networkplumber.org>
Wed, 23 May 2018 22:29:56 +0000 (15:29 -0700)
rta_expires is a signed int; print it as one.

Fixes: 663c3cb23103f ("iproute: implement JSON and color output")
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
ip/iproute.c

index 56dd9f25e38e13336eee7022408e0c6965f2c481..cbc43e2b691ac8d8e8c5d0dec67649b2f790fb14 100644 (file)
@@ -463,8 +463,8 @@ static void print_rta_cacheinfo(FILE *fp, const struct rta_cacheinfo *ci)
                hz = get_user_hz();
 
        if (ci->rta_expires != 0)
-               print_uint(PRINT_ANY, "expires",
-                          "expires %usec ", ci->rta_expires/hz);
+               print_int(PRINT_ANY, "expires",
+                          "expires %dsec ", ci->rta_expires/hz);
        if (ci->rta_error != 0)
                print_uint(PRINT_ANY, "error",
                           "error %u ", ci->rta_error);