diff options
author | David Hill <dhill@cvs.openbsd.org> | 2006-04-13 03:14:19 +0000 |
---|---|---|
committer | David Hill <dhill@cvs.openbsd.org> | 2006-04-13 03:14:19 +0000 |
commit | 891edc76a8224070afd09d82d9105ca00d1d0f54 (patch) | |
tree | 227c511e0496ff5e4fdcee33dd44274278589c26 /bin/ls/ls.c | |
parent | 82c635a59bfc59ab0451dcea9aa4e16ccedefe2a (diff) |
Change maxsize to type off_t.
Add a cast for portability's sake.
"Right..." @deraadt
Diffstat (limited to 'bin/ls/ls.c')
-rw-r--r-- | bin/ls/ls.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/bin/ls/ls.c b/bin/ls/ls.c index 75a61e1d8b0..12addc1be85 100644 --- a/bin/ls/ls.c +++ b/bin/ls/ls.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ls.c,v 1.27 2005/11/30 00:57:25 deraadt Exp $ */ +/* $OpenBSD: ls.c,v 1.28 2006/04/13 03:14:18 dhill Exp $ */ /* $NetBSD: ls.c,v 1.18 1996/07/09 09:16:29 mycroft Exp $ */ /* @@ -43,7 +43,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)ls.c 8.7 (Berkeley) 8/5/94"; #else -static char rcsid[] = "$OpenBSD: ls.c,v 1.27 2005/11/30 00:57:25 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: ls.c,v 1.28 2006/04/13 03:14:18 dhill Exp $"; #endif #endif /* not lint */ @@ -398,7 +398,7 @@ display(FTSENT *p, FTSENT *list) DISPLAY d; FTSENT *cur; NAMES *np; - u_quad_t maxsize; + off_t maxsize; u_long btotal, maxblock, maxinode, maxlen, maxnlink; int bcfile, flen, glen, ulen, maxflags, maxgroup, maxuser; int entries, needstats; @@ -528,7 +528,8 @@ display(FTSENT *p, FTSENT *list) (void)snprintf(buf, sizeof(buf), "%lu", maxnlink); d.s_nlink = strlen(buf); if (!f_humanval) { - (void)snprintf(buf, sizeof(buf), "%qu", maxsize); + (void)snprintf(buf, sizeof(buf), "%lld", + (long long) maxsize); d.s_size = strlen(buf); } else d.s_size = FMT_SCALED_STRSIZE-2; /* no - or '\0' */ |