svn commit: trunk/busybox/miscutils
aldot at busybox.net
aldot at busybox.net
Mon Feb 23 16:51:26 UTC 2009
Author: aldot
Date: 2009-02-23 16:51:25 +0000 (Mon, 23 Feb 2009)
New Revision: 25430
Log:
- by not calling getpagesize() twice we can save 2 bytes (walter harms)
Modified:
trunk/busybox/miscutils/time.c
Changeset:
Modified: trunk/busybox/miscutils/time.c
===================================================================
--- trunk/busybox/miscutils/time.c 2009-02-23 16:21:53 UTC (rev 25429)
+++ trunk/busybox/miscutils/time.c 2009-02-23 16:51:25 UTC (rev 25430)
@@ -89,7 +89,7 @@
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 @@
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);
More information about the busybox-cvs
mailing list