You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "SunJun8 (via GitHub)" <gi...@apache.org> on 2023/06/15 00:57:06 UTC
[GitHub] [nuttx-apps] SunJun8 commented on a diff in pull request #1793: netutils/iperf: Fix possible precision loss
SunJun8 commented on code in PR #1793:
URL: https://github.com/apache/nuttx-apps/pull/1793#discussion_r1230306387
##########
netutils/iperf/iperf.c:
##########
@@ -323,7 +323,7 @@ static void iperf_report_task(FAR void *arg)
ts_diff(&last, &start),
ts_diff(&now, &start),
now_len -last_len,
- ((double)((now_len - last_len) * 8) / 1000000) /
+ ((double)((now_len - last_len) * 8) / 1000000.0) /
Review Comment:
Done
##########
netutils/iperf/iperf.c:
##########
@@ -338,7 +338,7 @@ static void iperf_report_task(FAR void *arg)
ts_diff(&start, &start),
ts_diff(&now, &start),
now_len,
- ((double)(now_len * 8) / 1000000) /
+ ((double)(now_len * 8) / 1000000.0) /
(double)ts_diff(&now, &start)
Review Comment:
Done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org