From 76b51e80cbd9d1da86f999b77fdabe84274b1676 Mon Sep 17 00:00:00 2001 From: jkim Date: Tue, 21 May 2013 19:20:03 +0000 Subject: Do not use log10(3) to get rid of libm dependency. It is really not useful. --- contrib/flex/buf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'contrib/flex/buf.c') diff --git a/contrib/flex/buf.c b/contrib/flex/buf.c index fa713a6..d6efdac 100644 --- a/contrib/flex/buf.c +++ b/contrib/flex/buf.c @@ -95,7 +95,7 @@ struct Buf *buf_linedir (struct Buf *buf, const char* filename, int lineno) t = flex_alloc (strlen ("#line \"\"\n") + /* constant parts */ 2 * strlen (filename) + /* filename with possibly all backslashes escaped */ - (int) (1 + log10 (abs (lineno))) + /* line number */ + NUMCHARLINES + /* line number */ 1); /* NUL */ if (!t) flexfatal (_("Allocation of buffer for line directive failed")); -- cgit v1.1