public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: dsahern@kernel.org
To: netdev@vger.kernel.org, stephen@networkplumber.org
Cc: David Ahern <dsahern@gmail.com>
Subject: [PATCH iproute2] ip route: Print expires as signed int
Date: Wed, 23 May 2018 11:50:01 -0700	[thread overview]
Message-ID: <20180523185001.32686-1-dsahern@kernel.org> (raw)

From: David Ahern <dsahern@gmail.com>

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>
---
 ip/iproute.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ip/iproute.c b/ip/iproute.c
index 56dd9f25e38e..cbc43e2b691a 100644
--- a/ip/iproute.c
+++ b/ip/iproute.c
@@ -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);
-- 
2.11.0

             reply	other threads:[~2018-05-23 18:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-23 18:50 dsahern [this message]
2018-05-23 22:30 ` [PATCH iproute2] ip route: Print expires as signed int Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180523185001.32686-1-dsahern@kernel.org \
    --to=dsahern@kernel.org \
    --cc=dsahern@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox