diff options
author | jkim <jkim@FreeBSD.org> | 2013-05-21 19:20:03 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2013-05-21 19:20:03 +0000 |
commit | 76b51e80cbd9d1da86f999b77fdabe84274b1676 (patch) | |
tree | b9c0d452c5ef35e9b6a559d635e5d05d0fc19371 /contrib/flex/buf.c | |
parent | f35b94300055627286d77f0dd748057f5d98b5f0 (diff) | |
download | FreeBSD-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.c | 2 |
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")); |