xiaoxiang781216 commented on code in PR #7020: URL: https://github.com/apache/incubator-nuttx/pull/7020#discussion_r964349288
########## net/netdev/netdev_ioctl.c: ########## @@ -636,235 +700,201 @@ static FAR struct net_driver_s *netdev_ifr_dev(FAR struct ifreq *req) static int netdev_ifr_ioctl(FAR struct socket *psock, int cmd, FAR struct ifreq *req) { - FAR struct net_driver_s *dev; - int ret = -EINVAL; + FAR struct net_driver_s *dev = NULL; + int ret = OK; ninfo("cmd: %d\n", cmd); net_lock(); - /* Execute the command */ + /* Execute commands that do not need ifr_name or lifr_name */ switch (cmd) { + case SIOCGIFCOUNT: /* Get number of devices */ + { Review Comment: let's remove all unnecessary {} -- 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