summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorsheldonh <sheldonh@FreeBSD.org>1999-08-19 13:04:08 +0000
committersheldonh <sheldonh@FreeBSD.org>1999-08-19 13:04:08 +0000
commit7c5ab4e28ded2320501c6166e7cfe08a0942ec28 (patch)
tree80eeb7dceebee29da78d32217d605b205326e6cf /bin
parentc57b7dbc2aa6eb36ef1d3e3d0e7233b65452581a (diff)
downloadFreeBSD-src-7c5ab4e28ded2320501c6166e7cfe08a0942ec28.zip
FreeBSD-src-7c5ab4e28ded2320501c6166e7cfe08a0942ec28.tar.gz
Take integer rounding into account in the buffer size approximation
macro. So now it's (1 +) for the sign and (+ 1) for rounding. Reported by: bde
Diffstat (limited to 'bin')
-rw-r--r--bin/ls/ls.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/ls/ls.c b/bin/ls/ls.c
index 5f2ca95..c37cb64 100644
--- a/bin/ls/ls.c
+++ b/bin/ls/ls.c
@@ -45,7 +45,7 @@ static const char copyright[] =
static char sccsid[] = "@(#)ls.c 8.5 (Berkeley) 4/2/94";
#else
static const char rcsid[] =
- "$Id: ls.c,v 1.25 1999/08/02 14:55:58 sheldonh Exp $";
+ "$Id: ls.c,v 1.26 1999/08/19 11:36:12 sheldonh Exp $";
#endif
#endif /* not lint */
@@ -72,7 +72,7 @@ static const char rcsid[] =
* represent a value of integral type t as a string, excluding the
* NUL terminator, with provision for a sign.
*/
-#define STRBUF_SIZEOF(t) (CHAR_BIT * sizeof(t) / 3 + 1)
+#define STRBUF_SIZEOF(t) (1 + CHAR_BIT * sizeof(t) / 3 + 1)
static void display __P((FTSENT *, FTSENT *));
static u_quad_t makenines __P((u_long));
OpenPOWER on IntegriCloud