You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "pkarashchenko (via GitHub)" <gi...@apache.org> on 2023/08/16 20:49:43 UTC

[GitHub] [nuttx-apps] pkarashchenko commented on a diff in pull request #1970: Use the macros from sys/param.h

pkarashchenko commented on code in PR #1970:
URL: https://github.com/apache/nuttx-apps/pull/1970#discussion_r1296412797


##########
examples/webserver/cgi.c:
##########
@@ -80,7 +81,7 @@ static void net_stats(struct httpd_state *pstate, char *ptr)
   chunked_http_tx = pstate->ht_chunked;
 #endif
 
-  for (i = 0; i < sizeof(g_netstats) / sizeof(net_stats_t); i++)
+  for (i = 0; i < nitems(g_netstats); i++)

Review Comment:
   This part will not work with `nitems` since here the structure members are iterated and `g_netstats` is not an array.
   Let's revert changes in this file



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