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



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

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

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

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

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

Review comment:
       can we use `bool` instead of `int`?

##########
File path: netutils/ping/icmpv6_ping.c
##########
@@ -289,7 +308,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:
       why do we need to switch from `TICK2MSEC` to `TICK2USEC`?

##########
File path: netutils/ping/icmpv6_ping.c
##########
@@ -261,7 +280,7 @@ void icmp6_ping(FAR const struct ping6_info_s *info)
           recvfd.events   = POLLIN;
           recvfd.revents  = 0;
 
-          ret = poll(&recvfd, 1, info->timeout - elapsed);
+          ret = poll(&recvfd, 1, info->timeout - elapsed / USEC_PER_MSEC);

Review comment:
       Don't we need the same change in `netutils/ping/icmp_ping.c`?




-- 
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