Switch helpers tc_core_{time2ktime,ktime2time} from long to unsigned as well.
Follow up patch to "Fix overflow in time2tick / tick2time." which switches
the remaining two helper functions from long to unsigned as well.
These functions are only used in "tc/q_hfsc.c" where both the passed argument
and the place the return value is stored are unsigned/u32 variables, so this
change should be safe to make but hasn't been tested as extensively as the
time2tick patch.
Signed-off-by: Andreas Henriksson <andreas@fatal.se>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
diff --git a/tc/tc_core.c b/tc/tc_core.c
index fb89876..8c3a2ac 100644
--- a/tc/tc_core.c
+++ b/tc/tc_core.c
@@ -45,12 +45,12 @@
return tick/tick_in_usec;
}
-long tc_core_time2ktime(long time)
+unsigned tc_core_time2ktime(unsigned time)
{
return time * clock_factor;
}
-long tc_core_ktime2time(long ktime)
+unsigned tc_core_ktime2time(unsigned ktime)
{
return ktime / clock_factor;
}