diff options
author | Denis Vlasenko | 2007-01-12 22:10:34 +0000 |
---|---|---|
committer | Denis Vlasenko | 2007-01-12 22:10:34 +0000 |
commit | 3a34d0c08a77ee48edc3f4353cc49b95aba85c2f (patch) | |
tree | 09708579e18a033c6722c5194c46116705f47b83 /runit/runit_lib.c | |
parent | 21b080daa8c180a43d10d6b3dee47134ef21e581 (diff) | |
download | busybox-3a34d0c08a77ee48edc3f4353cc49b95aba85c2f.zip busybox-3a34d0c08a77ee48edc3f4353cc49b95aba85c2f.tar.gz |
random small size optimizations
Diffstat (limited to 'runit/runit_lib.c')
-rw-r--r-- | runit/runit_lib.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/runit/runit_lib.c b/runit/runit_lib.c index b885a34..2953235 100644 --- a/runit/runit_lib.c +++ b/runit/runit_lib.c @@ -294,16 +294,11 @@ unsigned fmt_ptime(char *s, struct taia *ta) { } unsigned fmt_taia(char *s, struct taia *t) { - static char hex[16] = "0123456789abcdef"; static char pack[TAIA_PACK]; - int i; taia_pack(pack, t); - s[0] = '@'; - for (i = 0; i < 12; ++i) { - s[i*2+1] = hex[(pack[i] >> 4) &15]; - s[i*2+2] = hex[pack[i] &15]; - } + *s++ = '@'; + bin2hex(s, pack, 12); return 25; } |