aboutsummaryrefslogtreecommitdiff
path: root/runit
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-07-27 15:06:25 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-07-27 15:06:25 +0000
commitf868963c672ffdfc4bd37670b8d74342577264b1 (patch)
tree4966afe1bbfaa0aa8ea313354e8be875307e027c /runit
parent75878706174290fbf5faac0215b3b9ae78fa9d6f (diff)
downloadbusybox-w32-f868963c672ffdfc4bd37670b8d74342577264b1.tar.gz
busybox-w32-f868963c672ffdfc4bd37670b8d74342577264b1.tar.bz2
busybox-w32-f868963c672ffdfc4bd37670b8d74342577264b1.zip
multiplier suffixes are short, store them directly in struct suffix_mult
function old new delta xstrtoul_range_sfx 226 217 -9 xstrtoull_range_sfx 291 280 -11 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-20) Total: -20 bytes text data bss dec hex filename 669128 2668 13616 685412 a7564 busybox_old 669108 2668 13616 685392 a7550 busybox_unstripped
Diffstat (limited to 'runit')
-rw-r--r--runit/svlogd.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/runit/svlogd.c b/runit/svlogd.c
index 08e0b6446..b271b743f 100644
--- a/runit/svlogd.c
+++ b/runit/svlogd.c
@@ -488,9 +488,9 @@ static unsigned logdir_open(struct logdir *ld, const char *fn)
488 break; 488 break;
489 case 's': { 489 case 's': {
490 static const struct suffix_mult km_suffixes[] = { 490 static const struct suffix_mult km_suffixes[] = {
491 { "k", 1024 }, 491 { "k", 1024 },
492 { "m", 1024*1024 }, 492 { "m", 1024*1024 },
493 { NULL, 0 } 493 { }
494 }; 494 };
495 ld->sizemax = xatou_sfx(&s[1], km_suffixes); 495 ld->sizemax = xatou_sfx(&s[1], km_suffixes);
496 break; 496 break;
@@ -503,10 +503,10 @@ static unsigned logdir_open(struct logdir *ld, const char *fn)
503 break; 503 break;
504 case 't': { 504 case 't': {
505 static const struct suffix_mult mh_suffixes[] = { 505 static const struct suffix_mult mh_suffixes[] = {
506 { "m", 60 }, 506 { "m", 60 },
507 { "h", 60*60 }, 507 { "h", 60*60 },
508 /*{ "d", 24*60*60 },*/ 508 /*{ "d", 24*60*60 },*/
509 { NULL, 0 } 509 { }
510 }; 510 };
511 ld->tmax = xatou_sfx(&s[1], mh_suffixes); 511 ld->tmax = xatou_sfx(&s[1], mh_suffixes);
512 if (ld->tmax) { 512 if (ld->tmax) {