Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -r9a3cb86829b39a5c7ac4475b8601ebee2b622cd5 -r3ceb067da2066eeca3634b5a591ae9e32a7d4725 --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 9a3cb86829b39a5c7ac4475b8601ebee2b622cd5) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 3ceb067da2066eeca3634b5a591ae9e32a7d4725) @@ -562,10 +562,14 @@ *************************************************************************/ void handleDGSerialNumberRequest( void ) { + typedef struct + { + U08 topLevelSN[ MAX_TOP_LEVEL_SN_CHARS ]; + } LOCAL_TOP_SN_T; MESSAGE_T msg; DG_SYSTEM_RECORD_T system; U08 i; - U08 localTopLevelSN[ MAX_TOP_LEVEL_SN_CHARS ]; + LOCAL_TOP_SN_T localTopLevelSN; // Get the system's record. There are no arrays of system to check and also, raise no alarm since the system record // has been already checked in POST @@ -582,13 +586,13 @@ for ( i = 0; i < MAX_TOP_LEVEL_SN_CHARS; i++ ) { - // NOTE: a local variable was created to avoid system.topLevelSN in the messages list - // NOTE: for loop was used instead of memcpy to ensure it is not parsed in the messages list script - localTopLevelSN[ i ] = system.topLevelSN[ i ]; + // NOTE: A local variable was created to avoid system.topLevelSN in the messages list + // NOTE: For loop was used instead of memcpy to ensure it is not parsed in the messages list script + localTopLevelSN.topLevelSN[ i ] = system.topLevelSN[ i ]; } // Fill message payload - memcpy( payloadPtr, &localTopLevelSN, sizeof( localTopLevelSN ) ); + memcpy( payloadPtr, &localTopLevelSN, sizeof( LOCAL_TOP_SN_T ) ); payloadPtr += MAX_TOP_LEVEL_SN_CHARS; *payloadPtr = 0;