summaryrefslogtreecommitdiffstats
path: root/contrib/flex/buf.c
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2013-05-21 19:20:03 +0000
committerjkim <jkim@FreeBSD.org>2013-05-21 19:20:03 +0000
commit76b51e80cbd9d1da86f999b77fdabe84274b1676 (patch)
treeb9c0d452c5ef35e9b6a559d635e5d05d0fc19371 /contrib/flex/buf.c
parentf35b94300055627286d77f0dd748057f5d98b5f0 (diff)
downloadFreeBSD-src-76b51e80cbd9d1da86f999b77fdabe84274b1676.zip
FreeBSD-src-76b51e80cbd9d1da86f999b77fdabe84274b1676.tar.gz
Do not use log10(3) to get rid of libm dependency. It is really not useful.
Diffstat (limited to 'contrib/flex/buf.c')
-rw-r--r--contrib/flex/buf.c2
1 files changed, 1 insertions, 1 deletions
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"));
OpenPOWER on IntegriCloud