Skip to content

Commit 4d939cc

Browse files
committed
Cordio: put parentheses to correct order of precedence in ternary expressions
Also remove extraneous parentheses in comparison.
1 parent c7759fe commit 4d939cc

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

features/FEATURE_BLE/targets/TARGET_CORDIO_LL/stack/controller/sources/ble/lctr/lctr_int_adv_master_ae.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ static inline void lctrMstComputeAuxOffset(lctrAuxPtr_t *pAuxPtr, uint32_t *pOff
452452
{
453453
uint32_t offsetUsec = pAuxPtr->auxOffset * ((pAuxPtr->offsetUnits == LCTR_OFFS_UNITS_30_USEC) ? 30 : 300);
454454
uint32_t caPpm = BbGetClockAccuracy() + ((pAuxPtr->ca == LCTR_CLK_ACC_0_50_PPM) ? 50 : 500);
455-
uint32_t wwUsec = lctrCalcWindowWideningUsec((offsetUsec + (pAuxPtr->offsetUnits == LCTR_OFFS_UNITS_30_USEC) ? 30 : 300), caPpm);
455+
uint32_t wwUsec = lctrCalcWindowWideningUsec(offsetUsec + ((pAuxPtr->offsetUnits == LCTR_OFFS_UNITS_30_USEC) ? 30 : 300), caPpm);
456456

457457
*pOffsetUsec = offsetUsec - wwUsec;
458458
*pSyncDelayUsec = (wwUsec << 1) + ((pAuxPtr->offsetUnits == LCTR_OFFS_UNITS_30_USEC) ? 30 : 300); /* rounding compensation */

features/FEATURE_BLE/targets/TARGET_CORDIO_LL/stack/controller/sources/ble/lctr/lctr_isr_conn_slave.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ void lctrSlvConnEndOp(BbOpDesc_t *pOp)
452452
(WsfQueueEmpty(&pCtx->txArqQ)) &&
453453
(pCtx->state != LCTR_CONN_STATE_TERMINATING)))
454454
{
455-
if ((pCtx->llcpActiveProc == LCTR_PROC_INVALID))
455+
if (pCtx->llcpActiveProc == LCTR_PROC_INVALID)
456456
{
457457
numSkipCe = pCtx->maxLatency;
458458
}

features/FEATURE_BLE/targets/TARGET_CORDIO_LL/stack/controller/sources/ble/lctr/lctr_main_adv_master_ae.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1285,7 +1285,7 @@ void lctrMstPerScanOpCommit(lctrExtScanCtx_t *pExtScanCtx, lctrAuxPtr_t *pAuxPtr
12851285
pPerScanCtx->lastAnchorPoint = startTs + BB_US_TO_BB_TICKS(offsetUsec);
12861286
pPerScanCtx->lastActiveEvent = pPerScanCtx->eventCounter;
12871287
uint32_t caPpm = lctrCalcTotalAccuracy(pSyncInfo->sca);
1288-
uint32_t wwUsec = lctrCalcWindowWideningUsec((offsetUsec + (pSyncInfo->offsetUnits == LCTR_OFFS_UNITS_30_USEC) ? 30 : 300), caPpm);
1288+
uint32_t wwUsec = lctrCalcWindowWideningUsec(offsetUsec + ((pSyncInfo->offsetUnits == LCTR_OFFS_UNITS_30_USEC) ? 30 : 300), caPpm);
12891289
syncOffsetUsec = offsetUsec - wwUsec;
12901290
pPerScanCtx->rxSyncDelayUsec = pBle->op.mstPerScan.rxSyncDelayUsec = (wwUsec << 1) + ((pSyncInfo->offsetUnits == LCTR_OFFS_UNITS_30_USEC) ? 30 : 300); /* rounding compensation */
12911291
int16_t dueOffsetUsec = (offsetUsec - wwUsec) - BB_TICKS_TO_US(BB_US_TO_BB_TICKS(offsetUsec) - BB_US_TO_BB_TICKS(wwUsec));

0 commit comments

Comments
 (0)