mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 09:49:21 +08:00
NXStyle fixes
This commit is contained in:
parent
5f73dc89be
commit
b5c5948e1c
8 changed files with 75 additions and 72 deletions
|
@ -225,9 +225,12 @@
|
|||
#define CAN_ESR1_RX (1 << 3) /* Bit 3: FlexCAN in Reception */
|
||||
#define CAN_ESR1_FLTCONF_SHIFT (4) /* Bits 4-5: Fault Confinement State */
|
||||
#define CAN_ESR1_FLTCONF_MASK (3 << CAN_ESR1_FLTCONF_SHIFT)
|
||||
# define CAN_ESR1_FLTCONF_ACTV (0 << CAN_ESR1_FLTCONF_SHIFT) /* Error Active */
|
||||
# define CAN_ESR1_FLTCONF_PASV (1 << CAN_ESR1_FLTCONF_SHIFT) /* Error Passive */
|
||||
# define CAN_ESR1_FLTCONF_OFF (2 << CAN_ESR1_FLTCONF_SHIFT) /* Bus Off */
|
||||
# define CAN_ESR1_FLTCONF_ACTV (0 << CAN_ESR1_FLTCONF_SHIFT)
|
||||
/* Error Active */
|
||||
# define CAN_ESR1_FLTCONF_PASV (1 << CAN_ESR1_FLTCONF_SHIFT)
|
||||
/* Error Passive */
|
||||
# define CAN_ESR1_FLTCONF_OFF (2 << CAN_ESR1_FLTCONF_SHIFT)
|
||||
/* Bus Off */
|
||||
#define CAN_ESR1_TX (1 << 6) /* Bit 6: FlexCAN in Transmission */
|
||||
#define CAN_ESR1_IDLE (1 << 7) /* Bit 7: CAN bus is in IDLE state */
|
||||
#define CAN_ESR1_RXWRN (1 << 8) /* Bit 8: Rx Error Warning */
|
||||
|
|
|
@ -390,7 +390,7 @@ static int local_getsockname(FAR struct socket *psock,
|
|||
}
|
||||
else /* conn->lctype = LOCAL_TYPE_PATHNAME */
|
||||
{
|
||||
/* Get the full length of the socket name (including null terminator) */
|
||||
/* Get the full length of the socket name (incl. null terminator) */
|
||||
|
||||
int namelen = strlen(conn->lc_path) + 1;
|
||||
|
||||
|
|
|
@ -1109,7 +1109,7 @@ static int netdev_ifr_ioctl(FAR struct socket *psock, int cmd,
|
|||
#ifdef CONFIG_NETDEV_IFINDEX
|
||||
case SIOCGIFNAME: /* Get interface name */
|
||||
{
|
||||
struct net_driver_s *dev = netdev_findbyindex(req->ifr_ifindex);
|
||||
dev = netdev_findbyindex(req->ifr_ifindex);
|
||||
if (dev != NULL)
|
||||
{
|
||||
strncpy(req->ifr_name, dev->d_ifname, IFNAMSIZ);
|
||||
|
@ -1124,7 +1124,7 @@ static int netdev_ifr_ioctl(FAR struct socket *psock, int cmd,
|
|||
|
||||
case SIOCGIFINDEX: /* Index to name mapping */
|
||||
{
|
||||
struct net_driver_s *dev = netdev_findbyname(req->ifr_name);
|
||||
dev = netdev_findbyname(req->ifr_name);
|
||||
if (dev != NULL)
|
||||
{
|
||||
req->ifr_ifindex = dev->d_ifindex;
|
||||
|
|
Loading…
Reference in a new issue