Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/lastlogin The size_t type isn't necessarily an int ...
details: https://anonhg.NetBSD.org/src/rev/fb2c786cd55f
branches: trunk
changeset: 571175:fb2c786cd55f
user: he <he%NetBSD.org@localhost>
date: Sat Nov 13 00:11:03 2004 +0000
description:
The size_t type isn't necessarily an int (on arm it's an unsigned int),
so add casts to int before using as a printf field width specifier.
diffstat:
usr.sbin/lastlogin/lastlogin.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (31 lines):
diff -r b808ecde0360 -r fb2c786cd55f usr.sbin/lastlogin/lastlogin.c
--- a/usr.sbin/lastlogin/lastlogin.c Fri Nov 12 23:28:05 2004 +0000
+++ b/usr.sbin/lastlogin/lastlogin.c Sat Nov 13 00:11:03 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lastlogin.c,v 1.9 2004/11/11 20:17:36 christos Exp $ */
+/* $NetBSD: lastlogin.c,v 1.10 2004/11/13 00:11:03 he Exp $ */
/*
* Copyright (c) 1996 John M. Vinopal
* All rights reserved.
@@ -33,7 +33,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: lastlogin.c,v 1.9 2004/11/11 20:17:36 christos Exp $");
+__RCSID("$NetBSD: lastlogin.c,v 1.10 2004/11/13 00:11:03 he Exp $");
#endif
#include <sys/types.h>
@@ -447,9 +447,9 @@
{
time_t t = (time_t)o->o_tv.tv_sec;
printf("%-*.*s %-*.*s %-*.*s %s",
- namelen, namelen, o->o_name,
- linelen, linelen, o->o_line,
- hostlen, hostlen, gethost(o),
+ (int)namelen, (int)namelen, o->o_name,
+ (int)linelen, (int)linelen, o->o_line,
+ (int)hostlen, (int)hostlen, gethost(o),
t ? ctime(&t) : "Never logged in\n");
}
Home |
Main Index |
Thread Index |
Old Index