From 1f94b77952a33a10eac4b8628e840ea37c81c58a Mon Sep 17 00:00:00 2001 From: Sheldon Hearn Date: Thu, 19 Aug 1999 13:04:08 +0000 Subject: [PATCH] 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(-) diff --git a/bin/ls/ls.c b/bin/ls/ls.c index 5f2ca95e8cc..c37cb64103b 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));