]> git.ipfire.org Git - thirdparty/mtr.git/commitdiff
cast: do not downgrade to float when double should be used
authorSami Kerola <kerolasa@iki.fi>
Tue, 16 Aug 2016 09:06:46 +0000 (10:06 +0100)
committerSami Kerola <kerolasa@iki.fi>
Tue, 16 Aug 2016 09:52:09 +0000 (10:52 +0100)
Regression from commit 78f019aa9d49be5ada89296a462939738c20c181

Requested-by: rewolff <R.E.Wolff@BitWizard.nl>
Reference: https://github.com/traviscross/mtr/pull/135/files#r74889063

report.c

index 02ea6cbe74fc3f7ec27dc151523ac8b86fd98ef1..cbea49b91067bbfab9d0c0b1c873c85444bc8bbc 100644 (file)
--- a/report.c
+++ b/report.c
@@ -472,7 +472,7 @@ void csv_close(time_t now)
 
       /* 1000.0 is a temporay hack for stats usec to ms, impacted net_loss. */
       if( strchr( data_fields[j].format, 'f' ) ) {
-       printf( ",%.2f", (float) (data_fields[j].net_xxx(at) / 1000.0));
+       printf( ",%.2f", (double) (data_fields[j].net_xxx(at) / 1000.0));
       } else {
        printf( ",%d",   data_fields[j].net_xxx(at) );
       }