From 7c5ab4e28ded2320501c6166e7cfe08a0942ec28 Mon Sep 17 00:00:00 2001 From: sheldonh Date: Thu, 19 Aug 1999 13:04:08 +0000 Subject: 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 --- bin/ls/ls.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin') 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)); -- cgit v1.1