Utility macros to improve readability/static analysis. (#219)

* Update FreeRTOS_IP_Private.h

* Update FreeRTOS_Sockets.h

* Update FreeRTOS_DNS.c

* Correct version number

* Update version number

* Update version number
This commit is contained in:
Aniruddha Kanhere 2020-08-27 15:37:03 -07:00 committed by GitHub
parent 669084ee8f
commit 0b48e6a3b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 72 additions and 42 deletions

View file

@ -205,6 +205,12 @@ struct xSOCKET;
typedef struct xSOCKET *Socket_t;
typedef struct xSOCKET const * ConstSocket_t;
static portINLINE int prvSocketValid( Socket_t xSocket )
{
/* coverity[misra_c_2012_rule_11_4_violation] */
return ( ( xSocket != FREERTOS_INVALID_SOCKET ) && ( xSocket != NULL ) );
}
#if( ipconfigSUPPORT_SELECT_FUNCTION == 1 )
/* The SocketSet_t type is the equivalent to the fd_set type used by the
Berkeley API. */
@ -417,15 +423,3 @@ void FreeRTOS_netstat( void );
#endif /* FREERTOS_SOCKETS_H */