net/: Fix some new problems found by the current nxstyle with .c files in the net/ directory. (#92)

This commit is contained in:
patacongo 2020-01-13 14:26:04 -06:00 committed by Abdelatif Guettouche
parent bd0fe25418
commit 3a3539f2be
10 changed files with 22 additions and 18 deletions

View File

@ -58,7 +58,7 @@
#ifdef CONFIG_NET_IGMP
/****************************************************************************
* Private Functions
* Pre-processor Definitions
****************************************************************************/
/* Buffer layout */

View File

@ -54,7 +54,7 @@
#include "local/local.h"
/****************************************************************************
* Private Functions
* Pre-processor Definitions
****************************************************************************/
#define LOCAL_CS_SUFFIX "CS" /* Name of the client-to-server FIFO */

View File

@ -1,7 +1,7 @@
/****************************************************************************
* net/pkt/pkt_conn.c
*
* Copyright (C) 2014, 2016-2017 Gregory Nutt. All rights reserved.
* Copyright (C) 2014, 2016-2017, 2020 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Large parts of this file were leveraged from uIP logic:
@ -58,6 +58,15 @@
#include "devif/devif.h"
#include "pkt/pkt.h"
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
#define eth_addr_cmp(addr1, addr2) \
((addr1[0] == addr2[0]) && (addr1[1] == addr2[1]) && \
(addr1[2] == addr2[2]) && (addr1[3] == addr2[3]) && \
(addr1[4] == addr2[4]) && (addr1[5] == addr2[5]))
/****************************************************************************
* Private Data
****************************************************************************/
@ -199,11 +208,6 @@ void pkt_free(FAR struct pkt_conn_s *conn)
FAR struct pkt_conn_s *pkt_active(FAR struct eth_hdr_s *buf)
{
#define eth_addr_cmp(addr1, addr2) \
((addr1[0] == addr2[0]) && (addr1[1] == addr2[1]) && \
(addr1[2] == addr2[2]) && (addr1[3] == addr2[3]) && \
(addr1[4] == addr2[4]) && (addr1[5] == addr2[5]))
FAR struct pkt_conn_s *conn =
(FAR struct pkt_conn_s *)g_active_pkt_connections.head;

View File

@ -77,7 +77,7 @@
while (0)
/****************************************************************************
* Public Types
* Private Types
****************************************************************************/
#ifdef CONFIG_ROUTE_IPv4_CACHEROUTE
@ -470,7 +470,7 @@ static void net_reset_ipv6_cache(void)
#endif
/****************************************************************************
* Public Function Prototypes
* Public Functions
****************************************************************************/
/****************************************************************************

View File

@ -58,7 +58,7 @@
#if defined(CONFIG_ROUTE_IPv4_FILEROUTE) || defined(CONFIG_ROUTE_IPv6_FILEROUTE)
/****************************************************************************
* Public Types
* Private Types
****************************************************************************/
#ifdef CONFIG_ROUTE_IPv4_FILEROUTE

View File

@ -53,7 +53,7 @@
#if defined(CONFIG_ROUTE_IPv4_RAMROUTE) || defined(CONFIG_ROUTE_IPv6_RAMROUTE)
/****************************************************************************
* Public Types
* Private Types
****************************************************************************/
#ifdef CONFIG_ROUTE_IPv4_RAMROUTE

View File

@ -56,7 +56,7 @@
#if defined(CONFIG_ROUTE_IPv4_FILEROUTE) || defined(CONFIG_ROUTE_IPv6_FILEROUTE)
/****************************************************************************
* Pre-processor Defintions
* Pre-processor Definitions
****************************************************************************/
/* Special "impossible" PID value used to indicate that there is no holder

View File

@ -54,7 +54,7 @@
#if defined(CONFIG_NET) && defined(CONFIG_NET_ROUTE)
/****************************************************************************
* Pre-processor defintions
* Pre-processor Definitions
****************************************************************************/
#ifdef CONFIG_ROUTE_IPv6_CACHEROUTE
@ -70,7 +70,7 @@
#endif
/****************************************************************************
* Public Types
* Private Types
****************************************************************************/
#ifdef CONFIG_NET_IPv4

View File

@ -53,7 +53,7 @@
#if defined(CONFIG_NET) && defined(CONFIG_NET_ROUTE)
/****************************************************************************
* Pre-processor defintions
* Pre-processor Definitions
****************************************************************************/
#ifdef CONFIG_ROUTE_IPv6_CACHEROUTE
@ -69,7 +69,7 @@
#endif
/****************************************************************************
* Public Types
* Private Types
****************************************************************************/
#ifdef CONFIG_NET_IPv4

View File

@ -62,7 +62,7 @@
#include "usrsock/usrsock.h"
/****************************************************************************
* Definitions
* Pre-processor Definitions
****************************************************************************/
#ifndef CONFIG_NET_USRSOCKDEV_NPOLLWAITERS