From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: [PATCH iproute2-next 7/9] tc/util: remove unused print_time Date: Mon, 9 Jul 2018 12:48:54 -0700 Message-ID: <20180709194856.18922-8-stephen@networkplumber.org> References: <20180709194856.18922-1-stephen@networkplumber.org> Cc: Stephen Hemminger To: netdev@vger.kernel.org Return-path: Received: from mail-pg1-f170.google.com ([209.85.215.170]:40905 "EHLO mail-pg1-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933040AbeGITtG (ORCPT ); Mon, 9 Jul 2018 15:49:06 -0400 Received: by mail-pg1-f170.google.com with SMTP id x5-v6so1466719pgp.7 for ; Mon, 09 Jul 2018 12:49:06 -0700 (PDT) In-Reply-To: <20180709194856.18922-1-stephen@networkplumber.org> Sender: netdev-owner@vger.kernel.org List-ID: From: Stephen Hemminger Only sprint_time is used. Signed-off-by: Stephen Hemminger --- tc/tc_util.c | 8 ++------ tc/tc_util.h | 1 - 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/tc/tc_util.c b/tc/tc_util.c index 01e131b5c5d7..95cb49b98612 100644 --- a/tc/tc_util.c +++ b/tc/tc_util.c @@ -357,9 +357,9 @@ int get_time(unsigned int *time, const char *str) return 0; } - -void print_time(char *buf, int len, __u32 time) +char *sprint_time(__u32 time, char *buf) { + const size_t len = SPRINT_BSIZE - 1; double tmp = time; if (tmp >= TIME_UNITS_PER_SEC) @@ -368,11 +368,7 @@ void print_time(char *buf, int len, __u32 time) snprintf(buf, len, "%.1fms", tmp/(TIME_UNITS_PER_SEC/1000)); else snprintf(buf, len, "%uus", time); -} -char *sprint_time(__u32 time, char *buf) -{ - print_time(buf, SPRINT_BSIZE-1, time); return buf; } diff --git a/tc/tc_util.h b/tc/tc_util.h index 01c6a09a8839..16babd21b473 100644 --- a/tc/tc_util.h +++ b/tc/tc_util.h @@ -85,7 +85,6 @@ int get_time(unsigned int *time, const char *str); int get_linklayer(unsigned int *val, const char *arg); void print_qdisc_handle(char *buf, int len, __u32 h); -void print_time(char *buf, int len, __u32 time); void print_linklayer(char *buf, int len, unsigned int linklayer); void print_devname(enum output_type type, int ifindex); -- 2.18.0