aboutsummaryrefslogtreecommitdiff
path: root/crypto/bio/b_print.c
diff options
context:
space:
mode:
authorGeoff Thorpe <geoff@openssl.org>2004-03-25 02:19:42 +0000
committerGeoff Thorpe <geoff@openssl.org>2004-03-25 02:19:42 +0000
commit032c3ecb18ca3ac4823424aaf072f2deb28a987c (patch)
tree8b10e87cc1df432302068d850ae57c2747072d68 /crypto/bio/b_print.c
parente703b4659878f479bf3b0df49c1004860fe29d7a (diff)
downloadopenssl-032c3ecb18ca3ac4823424aaf072f2deb28a987c.zip
openssl-032c3ecb18ca3ac4823424aaf072f2deb28a987c.tar.gz
openssl-032c3ecb18ca3ac4823424aaf072f2deb28a987c.tar.bz2
Protect against gcc's "warning: cast does not match function type".
Diffstat (limited to 'crypto/bio/b_print.c')
-rw-r--r--crypto/bio/b_print.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/crypto/bio/b_print.c b/crypto/bio/b_print.c
index decefc2..47b0439 100644
--- a/crypto/bio/b_print.c
+++ b/crypto/bio/b_print.c
@@ -619,6 +619,7 @@ fmtfp(
int caps = 0;
long intpart;
long fracpart;
+ long max10;
if (max < 0)
max = 6;
@@ -639,11 +640,12 @@ fmtfp(
/* we "cheat" by converting the fractional part to integer by
multiplying by a factor of 10 */
- fracpart = roundv((pow10(max)) * (ufvalue - intpart));
+ max10 = roundv(pow10(max));
+ fracpart = roundv(pow10(max) * (ufvalue - intpart));
- if (fracpart >= (long)pow10(max)) {
+ if (fracpart >= max10) {
intpart++;
- fracpart -= (long)pow10(max);
+ fracpart -= max10;
}
/* convert integer part */