zhhyu7 commented on code in PR #7378:
URL: https://github.com/apache/incubator-nuttx/pull/7378#discussion_r1001341465


##########
net/inet/inet_sockif.c:
##########
@@ -1809,23 +1809,15 @@ FAR const struct sock_intf_s *
     }
   else
 #endif
-#ifdef NET_UDP_HAVE_STACK
-  if (type == SOCK_DGRAM && (protocol == 0 || protocol == IPPROTO_UDP))
-    {
-      return &g_inet_sockif;
-    }
-  else
-#endif
-#ifdef NET_TCP_HAVE_STACK
-  if (type == SOCK_STREAM && (protocol == 0 || protocol == IPPROTO_TCP))
+#if defined(NET_UDP_HAVE_STACK) || defined(NET_TCP_HAVE_STACK)

Review Comment:
   
https://github.com/linux-test-project/ltp/blob/3e0e60074495e1c350b634848e5dd1f7993ec2ef/testcases/kernel/syscalls/socket/socket01.c#L34-L39



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