mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-04 13:34:38 +08: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 */
|
/* The option flags */
|
||||||
case SO_BROADCAST:
|
case SO_BROADCAST:
|
||||||
if (NETCONNTYPE_GROUP(sock->conn->type) != NETCONN_UDP) {
|
|
||||||
done_socket(sock);
|
|
||||||
return ENOPROTOOPT;
|
|
||||||
}
|
|
||||||
case SO_KEEPALIVE:
|
case SO_KEEPALIVE:
|
||||||
#if SO_REUSE
|
#if SO_REUSE
|
||||||
case SO_REUSEADDR:
|
case SO_REUSEADDR:
|
||||||
#endif /* SO_REUSE */
|
#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);
|
LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, *optlen, int);
|
||||||
*(int*)optval = ip_get_option(sock->conn->pcb.ip, optname);
|
*(int*)optval = ip_get_option(sock->conn->pcb.ip, optname);
|
||||||
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, SOL_SOCKET, optname=0x%x, ..) = %s\n",
|
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, SOL_SOCKET, optname=0x%x, ..) = %s\n",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user