From 3a34d0c08a77ee48edc3f4353cc49b95aba85c2f Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Fri, 12 Jan 2007 22:10:34 +0000 Subject: random small size optimizations --- runit/runit_lib.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'runit') 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; } -- cgit v1.1