summaryrefslogtreecommitdiff
path: root/uptime.c
diff options
context:
space:
mode:
authorMatt Kraai2001-01-18 02:57:08 +0000
committerMatt Kraai2001-01-18 02:57:08 +0000
commit12f417edbd21b322a8eaa8feb0ab238f13fa83c6 (patch)
tree06f9de2e4c7d33d29a448fb1c42ed1beafe18e6e /uptime.c
parentc9acf8c766a9a2cc00449db5dea506d7663ad26b (diff)
downloadbusybox-12f417edbd21b322a8eaa8feb0ab238f13fa83c6.zip
busybox-12f417edbd21b322a8eaa8feb0ab238f13fa83c6.tar.gz
Eliminate calls of the form "fprintf(stdout,". Thanks for the idea to
Vladimir N. Oleynik.
Diffstat (limited to 'uptime.c')
-rw-r--r--uptime.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/uptime.c b/uptime.c
index 159f24b..fb3d347 100644
--- a/uptime.c
+++ b/uptime.c
@@ -51,19 +51,19 @@ extern int uptime_main(int argc, char **argv)
sysinfo(&info);
- fprintf(stdout, " %2d:%02d%s up ",
+ printf(" %2d:%02d%s up ",
current_time->tm_hour%12 ? current_time->tm_hour%12 : 12,
current_time->tm_min, current_time->tm_hour > 11 ? "pm" : "am");
updays = (int) info.uptime / (60*60*24);
if (updays)
- fprintf(stdout, "%d day%s, ", updays, (updays != 1) ? "s" : "");
+ printf("%d day%s, ", updays, (updays != 1) ? "s" : "");
upminutes = (int) info.uptime / 60;
uphours = (upminutes / 60) % 24;
upminutes %= 60;
if(uphours)
- fprintf(stdout, "%2d:%02d, ", uphours, upminutes);
+ printf("%2d:%02d, ", uphours, upminutes);
else
- fprintf(stdout, "%d min, ", upminutes);
+ printf("%d min, ", upminutes);
printf("load average: %ld.%02ld, %ld.%02ld, %ld.%02ld\n",
LOAD_INT(info.loads[0]), LOAD_FRAC(info.loads[0]),