diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2009-02-23 16:51:25 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2009-02-23 16:51:25 +0000 |
commit | 0adf7f2d46a9223a721b64dce9cecdec0b9cdf07 (patch) | |
tree | 542231e3e3bb30492c490c9c3fb627dec63cda80 | |
parent | f3b39a27a63205edaccdb1dcaf3046c0ba4d9be9 (diff) | |
download | busybox-0adf7f2d46a9223a721b64dce9cecdec0b9cdf07.tar.gz |
- by not calling getpagesize() twice we can save 2 bytes (walter harms)
-rw-r--r-- | miscutils/time.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/miscutils/time.c b/miscutils/time.c index dbc92d12f..30298fe32 100644 --- a/miscutils/time.c +++ b/miscutils/time.c @@ -89,7 +89,7 @@ static void printargv(char *const *argv) This is funky since the pagesize could be less than 1K. Note: Some machines express getrusage statistics in terms of K, others in terms of pages. */ -static unsigned long ptok(unsigned pagesize, unsigned long pages) +static unsigned long ptok(const unsigned pagesize, const unsigned long pages) { unsigned long tmp; @@ -303,7 +303,7 @@ static void summarize(const char *fmt, char **command, resource_t *resp) printf("%lu", ptok(pagesize, (UL) resp->ru.ru_ixrss) / cpu_ticks); break; case 'Z': /* Page size. */ - printf("%u", getpagesize()); + printf("%u", pagesize); break; case 'c': /* Involuntary context switches. */ printf("%lu", resp->ru.ru_nivcsw); |