mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-05 08:28:32 +00:00
gesockopt: fall-through in switch/case only if a case contains no code at all
This commit is contained in:
parent
5c35bab26c
commit
8345e9035f
@ -2448,14 +2448,15 @@ lwip_getsockopt_impl(int s, int level, int optname, void *optval, socklen_t *opt
|
||||
|
||||
/* The option flags */
|
||||
case SO_BROADCAST:
|
||||
if (NETCONNTYPE_GROUP(sock->conn->type) != NETCONN_UDP) {
|
||||
done_socket(sock);
|
||||
return ENOPROTOOPT;
|
||||
}
|
||||
case SO_KEEPALIVE:
|
||||
#if SO_REUSE
|
||||
case SO_REUSEADDR:
|
||||
#endif /* SO_REUSE */
|
||||
if ((optname == SO_BROADCAST) &&
|
||||
(NETCONNTYPE_GROUP(sock->conn->type) != NETCONN_UDP)) {
|
||||
done_socket(sock);
|
||||
return ENOPROTOOPT;
|
||||
}
|
||||
LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, *optlen, int);
|
||||
*(int*)optval = ip_get_option(sock->conn->pcb.ip, optname);
|
||||
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, SOL_SOCKET, optname=0x%x, ..) = %s\n",
|
||||
|
Loading…
Reference in New Issue
Block a user