pkarashchenko commented on code in PR #7004:
URL: https://github.com/apache/incubator-nuttx/pull/7004#discussion_r964485745


##########
net/procfs/net_procfs.c:
##########
@@ -52,26 +52,27 @@
  * Pre-processor Definitions
  ****************************************************************************/
 
-/* Directory entry indices */
+#define ARRAY_SIZE(x)   (sizeof(x) / sizeof((x)[0]))
 
-#ifdef CONFIG_NET_STATISTICS
-#  define STAT_INDEX     0
-#  ifdef CONFIG_NET_MLD
-#    define MLD_INDEX    1
-#    define _ROUTE_INDEX 2
-#  else
-#    define _ROUTE_INDEX 1
-#  endif
-#else
-#  define _ROUTE_INDEX   0
-#endif
+/****************************************************************************
+ * Private Type Definitions
+ ****************************************************************************/
 
-#ifdef CONFIG_NET_ROUTE
-#  define ROUTE_INDEX    _ROUTE_INDEX
-#  define DEV_INDEX      (_ROUTE_INDEX + 1)
-#else
-#  define DEV_INDEX      _ROUTE_INDEX
-#endif
+/* Read statistics function type */
+
+typedef ssize_t (*read_stat_t)(FAR struct netprocfs_file_s *priv,

Review Comment:
   ```suggestion
   typedef CODE ssize_t (*read_stat_t)(FAR struct netprocfs_file_s *priv,
   ```



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

Reply via email to