aboutsummaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>2001-03-21 21:49:33 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>2001-03-21 21:49:33 +0000
commit9575fb2f650c594111a3b289c8b5e6aa04021c7e (patch)
tree6a0e2ced0afb37047b769f48676b3f6089c1336f /usr.bin
parentfcf8327355be4604f62e8a1e2c0ff813b76bac54 (diff)
Notes
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/w/pr_time.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/usr.bin/w/pr_time.c b/usr.bin/w/pr_time.c
index 5f77cf6ade225..5596108a86a54 100644
--- a/usr.bin/w/pr_time.c
+++ b/usr.bin/w/pr_time.c
@@ -74,17 +74,16 @@ pr_attime(started, now)
tm.tm_year != tp.tm_year) {
/* The line below does not take DST into consideration */
/* else if (*now / 86400 != *started / 86400) { */
- (void)strcpy(fmt, use_ampm ? "%a%I%p" : "%a%H ");
+ (void)strcpy(fmt, use_ampm ? "%a%I%p" : "%a%H");
}
/* Default is hh:mm{am,pm}. */
else {
- (void)strcpy(fmt, use_ampm ? "%l:%M%p" : "%k:%M ");
+ (void)strcpy(fmt, use_ampm ? "%l:%M%p" : "%k:%M");
}
- (void)strftime(buf, sizeof(buf) - 1, fmt, &tp);
- buf[sizeof(buf) - 1] = '\0';
- (void)printf("%s", buf);
+ (void)strftime(buf, sizeof(buf), fmt, &tp);
+ (void)printf("%-7.7s", buf);
}
/*