aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/out.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-08-01 19:25:52 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-08-01 19:25:52 +0000
commit7f0ffae23166177e2bf9143942da3b5d722ab016 (patch)
treee58565ff4c3122d57c3feda421dd653b3cd486f6 /out.c
parentf0a1f96fe7ebbe75d5432cd491f6ea60095c5304 (diff)
downloadmandoc-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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/out.c b/out.c
index 9c4e4c94..0e5a63c0 100644
--- a/out.c
+++ b/out.c
@@ -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);
}