pkarashchenko commented on a change in pull request #1066:
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/1066#discussion_r826978792



##########
File path: netutils/ping/icmp_ping.c
##########
@@ -59,11 +61,21 @@
  */
 
 static uint16_t g_pingid = 0;
+static volatile bool exiting = false;

Review comment:
       ```suggestion
   static uint16_t g_pingid;
   static volatile bool exiting;
   ```

##########
File path: netutils/ping/icmpv6_ping.c
##########
@@ -289,7 +309,7 @@ void icmp6_ping(FAR const struct ping6_info_s *info)
               goto done;
             }
 
-          elapsed = (unsigned int)TICK2MSEC(clock() - start);
+          elapsed = (unsigned int)TICK2USEC(clock() - start);

Review comment:
       ```suggestion
             elapsed = (int32_t)TICK2USEC(clock() - start);
   ```

##########
File path: netutils/ping/icmp_ping.c
##########
@@ -290,7 +310,7 @@ void icmp_ping(FAR const struct ping_info_s *info)
               goto done;
             }
 
-          elapsed = (unsigned int)TICK2MSEC(clock() - start);
+          elapsed = (unsigned int)TICK2USEC(clock() - start);

Review comment:
       ```suggestion
             elapsed = (int32_t)TICK2USEC(clock() - start);
   ```

##########
File path: netutils/ping/icmpv6_ping.c
##########
@@ -58,11 +60,21 @@
  */
 
 static uint16_t g_ping6_id = 0;
+static volatile bool exiting = false;

Review comment:
       ```suggestion
   static uint16_t g_ping6_id;
   static volatile bool exiting;
   ```

##########
File path: netutils/ping/icmp_ping.c
##########
@@ -388,7 +409,7 @@ void icmp_ping(FAR const struct ping_info_s *info)
     }
 
 done:
-  icmp_callback(&result, ICMP_I_FINISH, TICK2MSEC(clock() - kickoff));
+  icmp_callback(&result, ICMP_I_FINISH, TICK2USEC(clock() - kickoff));

Review comment:
       Should we modify `int extra;                /* Extra information for 
code */` and `icmp_callback` parameter and change type from `int` to `int32_t` 
to carry increased precision?




-- 
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-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to