Skip to content

Commit a8bd51d

Browse files
authored
[Cellular Library] Fix misra coverage (#31)
1 parent 59bfdf4 commit a8bd51d

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

common/src/cellular_pktio.c

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,6 @@ static CellularPktStatus_t _Cellular_ProcessLine( const CellularContext_t * pCon
307307
uint32_t tokenSuccessTableSize = 0;
308308
uint32_t tokenErrorTableSize = 0;
309309
uint32_t tokenExtraTableSize = 0;
310-
int32_t flagkExtraTokenTableCheck = 0;
311310

312311
if( ( pContext->tokenTable.pCellularSrcTokenErrorTable != NULL ) &&
313312
( pContext->tokenTable.pCellularSrcTokenSuccessTable != NULL ) )
@@ -327,19 +326,21 @@ static CellularPktStatus_t _Cellular_ProcessLine( const CellularContext_t * pCon
327326

328327
if( result == true )
329328
{
330-
flagkExtraTokenTableCheck = 1;
329+
pResp->status = true;
330+
pkStatus = CELLULAR_PKT_STATUS_OK;
331+
CellularLogDebug( "Final AT response is SUCCESS [%s] in extra table", pLine );
331332
}
332333
else
333334
{
334335
( void ) Cellular_ATcheckErrorCode( pLine, pTokenSuccessTable,
335336
tokenSuccessTableSize, &result );
336-
}
337337

338-
if( result == true )
339-
{
340-
pResp->status = true;
341-
pkStatus = CELLULAR_PKT_STATUS_OK;
342-
CellularLogDebug( "Final AT response is SUCCESS [%s] in %s table", pLine, flagkExtraTokenTableCheck == 1 ? "extra" : "success" );
338+
if( result == true )
339+
{
340+
pResp->status = true;
341+
pkStatus = CELLULAR_PKT_STATUS_OK;
342+
CellularLogDebug( "Final AT response is SUCCESS [%s]", pLine );
343+
}
343344
}
344345

345346
if( result != true )

0 commit comments

Comments
 (0)