Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
tony-josi-aws committed Jun 14, 2024
1 parent 36bcde0 commit da61279
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 28 deletions.
24 changes: 12 additions & 12 deletions source/FreeRTOS_DNS.c
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@
* as gethostbyname() may be called from different threads */
BaseType_t xHasRandom = pdFALSE;
TickType_t uxIdentifier = 0U;

#if ( ipconfigDNS_USE_CALLBACKS == 1 )
BaseType_t xReturnSetCallback = pdPASS;
#endif
Expand Down Expand Up @@ -695,11 +695,11 @@
{
uxReadTimeOut_ticks = 0U;
xReturnSetCallback = xDNSSetCallBack( pcHostName,
pvSearchID,
pCallbackFunction,
uxTimeout,
( TickType_t ) uxIdentifier,
( xFamily == FREERTOS_AF_INET6 ) ? pdTRUE : pdFALSE );
pvSearchID,
pCallbackFunction,
uxTimeout,
( TickType_t ) uxIdentifier,
( xFamily == FREERTOS_AF_INET6 ) ? pdTRUE : pdFALSE );
}
}
else /* When ipconfigDNS_USE_CALLBACKS enabled, ppxAddressInfo is always non null. */
Expand All @@ -712,12 +712,12 @@
#endif /* if ( ipconfigDNS_USE_CALLBACKS == 1 ) */

if( ( ulIPAddress == 0U ) &&
#if ( ipconfigDNS_USE_CALLBACKS == 1 )
( xReturnSetCallback == pdPASS ) &&
#endif
( xHasRandom != pdFALSE ) )

#if ( ipconfigDNS_USE_CALLBACKS == 1 )
( xReturnSetCallback == pdPASS ) &&
#endif

( xHasRandom != pdFALSE ) )
{
ulIPAddress = prvGetHostByName( pcHostName,
uxIdentifier,
Expand Down
11 changes: 6 additions & 5 deletions source/FreeRTOS_DNS_Callback.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,11 @@
* @param[in] xIsIPv6 pdTRUE if the address type should be IPv6.
*/
BaseType_t xDNSSetCallBack( const char * pcHostName,
void * pvSearchID,
FOnDNSEvent pCallbackFunction,
TickType_t uxTimeout,
TickType_t uxIdentifier,
BaseType_t xIsIPv6 )
void * pvSearchID,
FOnDNSEvent pCallbackFunction,
TickType_t uxTimeout,
TickType_t uxIdentifier,
BaseType_t xIsIPv6 )
{
BaseType_t xReturn = pdPASS;
size_t lLength = strlen( pcHostName );
Expand Down Expand Up @@ -176,6 +176,7 @@
FreeRTOS_debug_printf( ( " xDNSSetCallBack : Could not allocate memory: %u bytes",
( unsigned ) ( sizeof( *pxCallback ) + lLength ) ) );
}

return xReturn;
}
/*-----------------------------------------------------------*/
Expand Down
10 changes: 5 additions & 5 deletions source/include/FreeRTOS_DNS_Callback.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@
struct freertos_addrinfo * pxAddress );

BaseType_t xDNSSetCallBack( const char * pcHostName,
void * pvSearchID,
FOnDNSEvent pCallbackFunction,
TickType_t uxTimeout,
TickType_t uxIdentifier,
BaseType_t xIsIPv6 );
void * pvSearchID,
FOnDNSEvent pCallbackFunction,
TickType_t uxTimeout,
TickType_t uxIdentifier,
BaseType_t xIsIPv6 );

void vDNSCheckCallBack( void * pvSearchID );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
void vDNSInitialise( void );

BaseType_t xDNSSetCallBack( const char * pcHostName,
void * pvSearchID,
FOnDNSEvent pCallbackFunction,
TickType_t xTimeout,
TickType_t xIdentifier,
BaseType_t xIsIPv6 );
void * pvSearchID,
FOnDNSEvent pCallbackFunction,
TickType_t xTimeout,
TickType_t xIdentifier,
BaseType_t xIsIPv6 );

void * safeMalloc( size_t xWantedSize ) /* Returns a NULL pointer if the wanted size is 0. */
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,6 @@ void test_xDNSSetCallBack_malloc_failed( void )
/* API Call */
xReturn = xDNSSetCallBack( "hostname", pvSearchID, dns_callback, 56, 123, pdFALSE );
TEST_ASSERT_EQUAL( pdFAIL, xReturn );

}


Expand Down

0 comments on commit da61279

Please sign in to comment.