mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 21:36:28 +08:00
net/: Run current nxstyle against all .c files under net/. Correct new problems identified by nxstyle. This is primarily a verification of the nxstyle changes (which all look good). (#89)
Co-authored-by: Gregory Nutt <gnutt@nuttx.org>
This commit is contained in:
committed by
Abdelatif Guettouche
parent
cd544b81b3
commit
51cbc85535
@@ -194,7 +194,8 @@ void icmpv6_radvertise(FAR struct net_driver_s *dev)
|
|||||||
/* Set up the source address option */
|
/* Set up the source address option */
|
||||||
|
|
||||||
srcaddr = (FAR struct icmpv6_srclladdr_s *)
|
srcaddr = (FAR struct icmpv6_srclladdr_s *)
|
||||||
((FAR uint8_t *)adv + sizeof(struct icmpv6_router_advertise_s));
|
((FAR uint8_t *)adv +
|
||||||
|
sizeof(struct icmpv6_router_advertise_s));
|
||||||
srcaddr->opttype = ICMPv6_OPT_SRCLLADDR;
|
srcaddr->opttype = ICMPv6_OPT_SRCLLADDR;
|
||||||
srcaddr->optlen = ICMPv6_OPT_OCTECTS(lladdrsize);
|
srcaddr->optlen = ICMPv6_OPT_OCTECTS(lladdrsize);
|
||||||
memcpy(srcaddr->srclladdr, &dev->d_mac, lladdrsize);
|
memcpy(srcaddr->srclladdr, &dev->d_mac, lladdrsize);
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
* Private Functions
|
* Private Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/******************************************************************************
|
/****************************************************************************
|
||||||
* Name: neighbor_dump_address
|
* Name: neighbor_dump_address
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
* Returned Value:
|
* Returned Value:
|
||||||
* None
|
* None
|
||||||
*
|
*
|
||||||
******************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static void neighbor_dump_address(FAR const void *buf, unsigned int buflen)
|
static void neighbor_dump_address(FAR const void *buf, unsigned int buflen)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ static int netprocfs_radio_linklayer(FAR struct netprocfs_file_s *netfile,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/**************************************************************************
|
||||||
* Name: netprocfs_linklayer
|
* Name: netprocfs_linklayer
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -228,8 +228,10 @@ int sixlowpan_compresshdr_hc1(FAR struct radio_driver_s *radio,
|
|||||||
hcudp[SIXLOWPAN_HC1_HC_UDP_UDP_ENCODING] = 0xe0;
|
hcudp[SIXLOWPAN_HC1_HC_UDP_UDP_ENCODING] = 0xe0;
|
||||||
hcudp[SIXLOWPAN_HC1_HC_UDP_TTL] = ipv6->ttl;
|
hcudp[SIXLOWPAN_HC1_HC_UDP_TTL] = ipv6->ttl;
|
||||||
hcudp[SIXLOWPAN_HC1_HC_UDP_PORTS] =
|
hcudp[SIXLOWPAN_HC1_HC_UDP_PORTS] =
|
||||||
(uint8_t)((ntohs(udp->srcport) - CONFIG_NET_6LOWPAN_MINPORT) << 4) +
|
(uint8_t)((ntohs(udp->srcport) -
|
||||||
(uint8_t)((ntohs(udp->destport) - CONFIG_NET_6LOWPAN_MINPORT));
|
CONFIG_NET_6LOWPAN_MINPORT) << 4) +
|
||||||
|
(uint8_t)((ntohs(udp->destport) -
|
||||||
|
CONFIG_NET_6LOWPAN_MINPORT));
|
||||||
|
|
||||||
memcpy(&hcudp[SIXLOWPAN_HC1_HC_UDP_CHKSUM], &udp->udpchksum, 2);
|
memcpy(&hcudp[SIXLOWPAN_HC1_HC_UDP_CHKSUM], &udp->udpchksum, 2);
|
||||||
|
|
||||||
|
|||||||
@@ -164,9 +164,9 @@ int psock_vfcntl(FAR struct socket *psock, int cmd, va_list ap)
|
|||||||
/* Set the file status flags, defined in <fcntl.h>, for the file description
|
/* Set the file status flags, defined in <fcntl.h>, for the file description
|
||||||
* associated with fd from the corresponding bits in the third argument,
|
* associated with fd from the corresponding bits in the third argument,
|
||||||
* arg, taken as type int. Bits corresponding to the file access mode and
|
* arg, taken as type int. Bits corresponding to the file access mode and
|
||||||
* the file creation flags, as defined in <fcntl.h>, that are set in arg shall
|
* the file creation flags, as defined in <fcntl.h>, that are set in arg
|
||||||
* be ignored. If any bits in arg other than those mentioned here are changed
|
* will be ignored. If any bits in arg other than those mentioned here are
|
||||||
* by the application, the result is unspecified.
|
* changed by the application, the result is unspecified.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user