forked from nuttx/nuttx-update
net/icmpv6: fix style issues
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
parent
40708e0ea7
commit
f79d3860c2
1 changed files with 24 additions and 22 deletions
|
@ -49,13 +49,15 @@ static int icmpv6_setup(FAR struct socket *psock);
|
|||
static sockcaps_t icmpv6_sockcaps(FAR struct socket *psock);
|
||||
static void icmpv6_addref(FAR struct socket *psock);
|
||||
static int icmpv6_netpoll(FAR struct socket *psock,
|
||||
FAR struct pollfd *fds, bool setup);
|
||||
FAR struct pollfd *fds, bool setup);
|
||||
static int icmpv6_close(FAR struct socket *psock);
|
||||
#ifdef CONFIG_NET_SOCKOPTS
|
||||
static int icmpv6_getsockopt(FAR struct socket *psock, int level,
|
||||
int option, FAR void *value, FAR socklen_t *value_len);
|
||||
int option, FAR void *value,
|
||||
FAR socklen_t *value_len);
|
||||
static int icmpv6_setsockopt(FAR struct socket *psock, int level,
|
||||
int option, FAR const void *value, socklen_t value_len);
|
||||
int option, FAR const void *value,
|
||||
socklen_t value_len);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -215,7 +217,7 @@ static void icmpv6_addref(FAR struct socket *psock)
|
|||
****************************************************************************/
|
||||
|
||||
static int icmpv6_netpoll(FAR struct socket *psock, FAR struct pollfd *fds,
|
||||
bool setup)
|
||||
bool setup)
|
||||
{
|
||||
/* Check if we are setting up or tearing down the poll */
|
||||
|
||||
|
@ -379,17 +381,17 @@ static int icmpv6_getsockopt(FAR struct socket *psock, int level, int option,
|
|||
FAR void *value, FAR socklen_t *value_len)
|
||||
{
|
||||
switch (level)
|
||||
{
|
||||
case IPPROTO_IPV6:
|
||||
return ipv6_getsockopt(psock, option, value, value_len);
|
||||
{
|
||||
case IPPROTO_IPV6:
|
||||
return ipv6_getsockopt(psock, option, value, value_len);
|
||||
|
||||
case IPPROTO_ICMPV6:
|
||||
return icmpv6_getsockopt_internal(psock, option, value, value_len);
|
||||
case IPPROTO_ICMPV6:
|
||||
return icmpv6_getsockopt_internal(psock, option, value, value_len);
|
||||
|
||||
default:
|
||||
nerr("ERROR: Unrecognized ICMPV6 option: %d\n", option);
|
||||
return -ENOPROTOOPT;
|
||||
}
|
||||
default:
|
||||
nerr("ERROR: Unrecognized ICMPV6 option: %d\n", option);
|
||||
return -ENOPROTOOPT;
|
||||
}
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -482,17 +484,17 @@ static int icmpv6_setsockopt(FAR struct socket *psock, int level, int option,
|
|||
FAR const void *value, socklen_t value_len)
|
||||
{
|
||||
switch (level)
|
||||
{
|
||||
case IPPROTO_IPV6:
|
||||
return ipv6_setsockopt(psock, option, value, value_len);
|
||||
{
|
||||
case IPPROTO_IPV6:
|
||||
return ipv6_setsockopt(psock, option, value, value_len);
|
||||
|
||||
case IPPROTO_ICMPV6:
|
||||
return icmpv6_setsockopt_internal(psock, option, value, value_len);
|
||||
case IPPROTO_ICMPV6:
|
||||
return icmpv6_setsockopt_internal(psock, option, value, value_len);
|
||||
|
||||
default:
|
||||
nerr("ERROR: Unrecognized ICMPV6 option: %d\n", option);
|
||||
return -ENOPROTOOPT;
|
||||
}
|
||||
default:
|
||||
nerr("ERROR: Unrecognized ICMPV6 option: %d\n", option);
|
||||
return -ENOPROTOOPT;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue