From: Stephen Hemminger <sthem...@microsoft.com>

This function is not used, only sprint_rate is used.

Signed-off-by: Stephen Hemminger <sthem...@microsoft.com>
---
 tc/tc_util.c | 10 +++-------
 tc/tc_util.h |  1 -
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/tc/tc_util.c b/tc/tc_util.c
index 05b6c97563b3..f5ffe3443892 100644
--- a/tc/tc_util.c
+++ b/tc/tc_util.c
@@ -307,7 +307,7 @@ int get_rate64(__u64 *rate, const char *str)
        return 0;
 }
 
-void print_rate(char *buf, int len, __u64 rate)
+char *sprint_rate(__u64 rate, char *buf)
 {
        extern int use_iec;
        unsigned long kilo = use_iec ? 1024 : 1000;
@@ -325,12 +325,8 @@ void print_rate(char *buf, int len, __u64 rate)
                rate /= kilo;
        }
 
-       snprintf(buf, len, "%.0f%s%sbit", (double)rate, units[i], str);
-}
-
-char *sprint_rate(__u64 rate, char *buf)
-{
-       print_rate(buf, SPRINT_BSIZE-1, rate);
+       snprintf(buf, SPRINT_BSIZE-1,
+                "%.0f%s%sbit", (double)rate, units[i], str);
        return buf;
 }
 
diff --git a/tc/tc_util.h b/tc/tc_util.h
index 64b309903c69..56e214cbc8de 100644
--- a/tc/tc_util.h
+++ b/tc/tc_util.h
@@ -84,7 +84,6 @@ int get_size_and_cell(unsigned int *size, int *cell_log, char 
*str);
 int get_time(unsigned int *time, const char *str);
 int get_linklayer(unsigned int *val, const char *arg);
 
-void print_rate(char *buf, int len, __u64 rate);
 void print_size(char *buf, int len, __u32 size);
 void print_qdisc_handle(char *buf, int len, __u32 h);
 void print_time(char *buf, int len, __u32 time);
-- 
2.18.0

Reply via email to