diff options
author | Bartosz Golaszewski <bartekgola@gmail.com> | 2014-06-22 14:01:13 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2014-06-22 14:01:13 +0200 |
commit | 5d2e409ef8224dc32fde59702e8ec90b231441ed (patch) | |
tree | 1d73d4a99a495ba57bc5be8878dce3cefbb99e9f /networking | |
parent | f92f1d0181853b989f9377debb56902e3e21c9a8 (diff) | |
download | busybox-w32-5d2e409ef8224dc32fde59702e8ec90b231441ed.tar.gz busybox-w32-5d2e409ef8224dc32fde59702e8ec90b231441ed.tar.bz2 busybox-w32-5d2e409ef8224dc32fde59702e8ec90b231441ed.zip |
libbb: use a wrapper around sysconf(_SC_CLK_TCK) to save a few bytes
function old new delta
bb_sc_clk_tck - 10 +10
timescmd 118 113 -5
print_route 1763 1758 -5
mpstat_main 1288 1283 -5
iostat_main 1947 1942 -5
INET_setroute 879 871 -8
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/5 up/down: 10/-28) Total: -18 bytes
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking')
-rw-r--r-- | networking/libiproute/iproute.c | 2 | ||||
-rw-r--r-- | networking/route.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c index f8a67d9ee..ec4d8ba03 100644 --- a/networking/libiproute/iproute.c +++ b/networking/libiproute/iproute.c | |||
@@ -73,7 +73,7 @@ static unsigned get_hz(void) | |||
73 | fclose(fp); | 73 | fclose(fp); |
74 | } | 74 | } |
75 | if (!hz_internal) | 75 | if (!hz_internal) |
76 | hz_internal = sysconf(_SC_CLK_TCK); | 76 | hz_internal = bb_clk_tck(); |
77 | return hz_internal; | 77 | return hz_internal; |
78 | } | 78 | } |
79 | 79 | ||
diff --git a/networking/route.c b/networking/route.c index 4235ea72c..24cc2eb5a 100644 --- a/networking/route.c +++ b/networking/route.c | |||
@@ -283,7 +283,7 @@ static NOINLINE void INET_setroute(int action, char **args) | |||
283 | if (k == KW_IPVx_IRTT) { | 283 | if (k == KW_IPVx_IRTT) { |
284 | rt->rt_flags |= RTF_IRTT; | 284 | rt->rt_flags |= RTF_IRTT; |
285 | rt->rt_irtt = xatoul(args_m1); | 285 | rt->rt_irtt = xatoul(args_m1); |
286 | rt->rt_irtt *= (sysconf(_SC_CLK_TCK) / 100); /* FIXME */ | 286 | rt->rt_irtt *= (bb_clk_tck() / 100); /* FIXME */ |
287 | #if 0 /* FIXME: do we need to check anything of this? */ | 287 | #if 0 /* FIXME: do we need to check anything of this? */ |
288 | if (rt->rt_irtt < 1 || rt->rt_irtt > (120 * HZ)) { | 288 | if (rt->rt_irtt < 1 || rt->rt_irtt > (120 * HZ)) { |
289 | bb_error_msg_and_die("bad irtt"); | 289 | bb_error_msg_and_die("bad irtt"); |