Ouss4 commented on code in PR #1151:
URL:
https://github.com/apache/incubator-nuttx-apps/pull/1151#discussion_r856066300
##########
system/ping/ping.c:
##########
@@ -242,10 +242,17 @@ static void ping_result(FAR const struct ping_result_s
*result)
result->extra / USEC_PER_MSEC);
if (result->nreplies > 0)
{
- long avg = priv->tsum / result->nreplies;
- long long tempnum = priv->tsum2 / result->nreplies -
+ long tmdev = 0;
+ long avg = 0;
+ long long tempnum = 0;
+
+ if (priv->tsum > 0)
Review Comment:
> Is it crash here?
https://github.com/apache/incubator-nuttx/blob/master/libs/libc/fixedmath/lib_ubsqrt.c#L60
Yes, because the function will receive 0 as argument.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]