Skip to content

Commit

Permalink
Corrections done according remarks from @moninom1
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaume.volery committed Oct 6, 2023
1 parent 76f9ac9 commit abb71ac
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions source/cellular_common_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ static CellularError_t _socketSetSockOptLevelTransport( CellularSocketOption_t o
}
else
{
LogError( ( "Cellular_SocketSetSockOpt: Cannot change the contextID in this state %d or length %ld is invalid.",
LogError( ( "Cellular_SocketSetSockOpt: Cannot change the contextID in this state %d or length %lu is invalid.",
socketHandle->socketState, optionValueLength ) );
cellularStatus = CELLULAR_INTERNAL_FAILURE;
}
Expand All @@ -123,7 +123,7 @@ static CellularError_t _socketSetSockOptLevelTransport( CellularSocketOption_t o
}
else
{
LogError( ( "Cellular_SocketSetSockOpt: Cannot change the localPort in this state %d or length %ld is invalid.",
LogError( ( "Cellular_SocketSetSockOpt: Cannot change the localPort in this state %d or length %lu is invalid.",
socketHandle->socketState, optionValueLength ) );
cellularStatus = CELLULAR_INTERNAL_FAILURE;
}
Expand Down
10 changes: 5 additions & 5 deletions source/cellular_pktio.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ static void _saveRawData( char * pLine,
CellularATCommandResponse_t * pResp,
uint32_t dataLen )
{
LogDebug( ( "Save [%p] %ld data to pResp", pLine, dataLen ) );
LogDebug( ( "Save [%p] %lu data to pResp", pLine, dataLen ) );
_saveData( pLine, pResp, dataLen );
}

Expand Down Expand Up @@ -546,7 +546,7 @@ static char * _handleLeftoverBuffer( CellularContext_t * pContext )
/* Move the leftover data or AT command response to the start of buffer.
* Set the pRead pointer to the empty buffer space. */

LogDebug( ( "moved the partial line/data from %p to %p %ld",
LogDebug( ( "moved the partial line/data from %p to %p %lu",
pContext->pPktioReadPtr, pContext->pktioReadBuf, pContext->partialDataRcvdLen ) );

( void ) memmove( pContext->pktioReadBuf, pContext->pPktioReadPtr, pContext->partialDataRcvdLen );
Expand Down Expand Up @@ -617,7 +617,7 @@ static char * _Cellular_ReadLine( CellularContext_t * pContext,
/* Add a NULL after the bytesRead. This is required for further processing. */
pRead[ bytesRead ] = '\0';

LogDebug( ( "AT Read %ld bytes, data[%p]", bytesRead, pRead ) );
LogDebug( ( "AT Read %lu bytes, data[%p]", bytesRead, pRead ) );
/* Set the pBytesRead only when actual bytes read from comm interface. */
*pBytesRead = bytesRead + partialDataRead;

Expand Down Expand Up @@ -670,7 +670,7 @@ static CellularPktStatus_t _handleData( char * pStartOfData,
/* There are more bytes after the data. */
*pBytesLeft = ( bytesDataAndLeft - pContext->dataLength );

LogDebug( ( "_handleData : read buffer buffer %p start %p prefix %ld left %ld, read total %ld",
LogDebug( ( "_handleData : read buffer buffer %p start %p prefix %lu left %lu, read total %lu",
pContext->pktioReadBuf,
pStartOfData,
bytesBeforeData,
Expand Down Expand Up @@ -1427,7 +1427,7 @@ uint32_t _Cellular_PktioSendData( CellularContext_t * pContext,
dataLen, CELLULAR_COMM_IF_SEND_TIMEOUT_MS, &sentLen );
}

LogDebug( ( "PktioSendData sent %ld bytes", sentLen ) );
LogDebug( ( "PktioSendData sent %lu bytes", sentLen ) );
return sentLen;
}

Expand Down

0 comments on commit abb71ac

Please sign in to comment.