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
This commit is contained in:
Sheldon Hearn 1999-08-19 13:04:08 +00:00
parent 008a491079
commit 1f94b77952
1 changed files with 2 additions and 2 deletions

View File

@ -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));