summaryrefslogtreecommitdiff
path: root/runit
diff options
context:
space:
mode:
Diffstat (limited to 'runit')
-rw-r--r--runit/runit_lib.c9
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;
}