diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-08-01 19:25:52 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-08-01 19:25:52 +0000 |
commit | 7f0ffae23166177e2bf9143942da3b5d722ab016 (patch) | |
tree | e58565ff4c3122d57c3feda421dd653b3cd486f6 /out.c | |
parent | f0a1f96fe7ebbe75d5432cd491f6ea60095c5304 (diff) | |
download | mandoc-7f0ffae23166177e2bf9143942da3b5d722ab016.tar.gz mandoc-7f0ffae23166177e2bf9143942da3b5d722ab016.tar.zst mandoc-7f0ffae23166177e2bf9143942da3b5d722ab016.zip |
Clarity with respect to floating point handling:
Write double constants as double rather than integer literals.
Remove useless explicit (double) cast done at one place and nowhere else.
No functional change.
Diffstat (limited to 'out.c')
-rw-r--r-- | out.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,4 +1,4 @@ -/* $Id: out.c,v 1.48 2014/04/20 16:46:05 schwarze Exp $ */ +/* $Id: out.c,v 1.49 2014/08/01 19:25:52 schwarze Exp $ */ /* * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2011 Ingo Schwarze <schwarze@openbsd.org> @@ -128,8 +128,8 @@ a2roffsu(const char *src, struct roffsu *dst, enum roffscale def) } /* FIXME: do this in the caller. */ - if ((dst->scale = atof(buf)) < 0) - dst->scale = 0; + if ((dst->scale = atof(buf)) < 0.0) + dst->scale = 0.0; dst->unit = unit; return(1); } |