Skip to content

Commit ba4f37f

Browse files
Fix compilation issue in WinSim Demo (FreeRTOS#1232)
* Fix compilation issue * Fix formatting * Uncrustify: triggered by comment. * Remove commented line --------- Co-authored-by: GitHub Action <[email protected]>
1 parent a33d259 commit ba4f37f

File tree

1 file changed

+5
-4
lines changed
  • FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator

1 file changed

+5
-4
lines changed

FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/main.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ static UBaseType_t ulNextRand;
145145

146146
int main( void )
147147
{
148+
BaseType_t xResult;
148149
const uint32_t ulLongTime_ms = pdMS_TO_TICKS( 1000UL );
149150

150151
/*
@@ -185,14 +186,14 @@ int main( void )
185186
}
186187
#endif /* ( ipconfigUSE_DHCP != 0 ) */
187188

188-
memcpy( ipLOCAL_MAC_ADDRESS, ucMACAddress, sizeof( ucMACAddress ) );
189-
190-
FreeRTOS_IPInit_Multi();
189+
xResult = FreeRTOS_IPInit_Multi();
191190
#else /* if defined( ipconfigIPv4_BACKWARD_COMPATIBLE ) && ( ipconfigIPv4_BACKWARD_COMPATIBLE == 0 ) */
192191
/* Using the old /single /IPv4 library, or using backward compatible mode of the new /multi library. */
193-
FreeRTOS_IPInit( ucIPAddress, ucNetMask, ucGatewayAddress, ucDNSServerAddress, ucMACAddress );
192+
xResult = FreeRTOS_IPInit( ucIPAddress, ucNetMask, ucGatewayAddress, ucDNSServerAddress, ucMACAddress );
194193
#endif /* defined( ipconfigIPv4_BACKWARD_COMPATIBLE ) && ( ipconfigIPv4_BACKWARD_COMPATIBLE == 0 ) */
195194

195+
configASSERT( xResult == pdTRUE );
196+
196197
/* Start the RTOS scheduler. */
197198
FreeRTOS_debug_printf( ( "vTaskStartScheduler\r\n" ) );
198199
vTaskStartScheduler();

0 commit comments

Comments
 (0)