Skip to content

Commit

Permalink
Fix nasa#39, Remove unnecessary parentheses around return values.
Browse files Browse the repository at this point in the history
  • Loading branch information
thnkslprpt committed Oct 13, 2022
1 parent bdcbbad commit 25ed5d6
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 40 deletions.
6 changes: 3 additions & 3 deletions fsw/src/lc_action.c
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ uint8 LC_EvaluateRPN(uint16 APNumber)
EvalResult = LC_ACTION_FAIL;
}

return (EvalResult);
return EvalResult;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand Down Expand Up @@ -600,7 +600,7 @@ int32 LC_ValidateADT(void *TableData)
"ADT verify results: good = %d, bad = %d, unused = %d", (int)GoodCount, (int)BadCount,
(int)UnusedCount);

return (TableResult);
return TableResult;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand Down Expand Up @@ -699,5 +699,5 @@ int32 LC_ValidateRPN(const uint16 *RPNPtr, int32 *IndexValue, int32 *StackDepthV
*StackDepthValue = StackDepth;
}

return (Result);
return Result;
}
32 changes: 16 additions & 16 deletions fsw/src/lc_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ int32 LC_AppInit(void)
LC_MAJOR_VERSION, LC_MINOR_VERSION, LC_REVISION, LC_MISSION_REV);
}

return (Status);
return Status;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand Down Expand Up @@ -247,7 +247,7 @@ int32 LC_EvsInit(void)
CFE_ES_WriteToSysLog("LC App: Error Registering For Event Services, RC = 0x%08X\n", (unsigned int)Status);
}

return (Status);
return Status;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand Down Expand Up @@ -316,7 +316,7 @@ int32 LC_SbInit(void)
}
}

return (Status);
return Status;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand Down Expand Up @@ -379,7 +379,7 @@ int32 LC_TableInit(void)
*/
if ((Result = LC_CreateResultTables()) != CFE_SUCCESS)
{
return (Result);
return Result;
}

/*
Expand All @@ -399,7 +399,7 @@ int32 LC_TableInit(void)
*/
if ((Result = LC_CreateDefinitionTables()) != CFE_SUCCESS)
{
return (Result);
return Result;
}

/*
Expand Down Expand Up @@ -431,7 +431,7 @@ int32 LC_TableInit(void)
{
CFE_EVS_SendEvent(LC_WDT_GETADDR_ERR_EID, CFE_EVS_EventType_ERROR, "Error getting WDT address, RC=0x%08X",
(unsigned int)Result);
return (Result);
return Result;
}

/*
Expand All @@ -443,15 +443,15 @@ int32 LC_TableInit(void)
{
CFE_EVS_SendEvent(LC_ADT_GETADDR_ERR_EID, CFE_EVS_EventType_ERROR, "Error getting ADT address, RC=0x%08X",
(unsigned int)Result);
return (Result);
return Result;
}
}
else
{
Result = LC_LoadDefaultTables();
if ((Result != CFE_SUCCESS) && (Result != CFE_TBL_INFO_UPDATED))
{
return (Result);
return Result;
}
}

Expand Down Expand Up @@ -484,7 +484,7 @@ int32 LC_TableInit(void)
(unsigned int)LC_OperData.TableResults);
}

return (CFE_SUCCESS);
return CFE_SUCCESS;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand Down Expand Up @@ -560,7 +560,7 @@ int32 LC_CreateResultTables(void)
LC_OperData.TableResults |= LC_ART_TBL_CREATED;
}

return (Result);
return Result;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand Down Expand Up @@ -716,7 +716,7 @@ int32 LC_CreateDefinitionTables(void)
}
}

return (Result);
return Result;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand Down Expand Up @@ -761,7 +761,7 @@ int32 LC_CreateTaskCDS(void)
{
CFE_EVS_SendEvent(LC_WRT_CDS_REGISTER_ERR_EID, CFE_EVS_EventType_ERROR,
"Error registering WRT CDS Area, RC=0x%08X", (unsigned int)Result);
return (Result);
return Result;
}

/*
Expand Down Expand Up @@ -795,7 +795,7 @@ int32 LC_CreateTaskCDS(void)
{
CFE_EVS_SendEvent(LC_ART_CDS_REGISTER_ERR_EID, CFE_EVS_EventType_ERROR,
"Error registering ART CDS Area, RC=0x%08X", (unsigned int)Result);
return (Result);
return Result;
}

/*
Expand Down Expand Up @@ -840,10 +840,10 @@ int32 LC_CreateTaskCDS(void)
{
CFE_EVS_SendEvent(LC_APP_CDS_REGISTER_ERR_EID, CFE_EVS_EventType_ERROR,
"Error registering application data CDS Area, RC=0x%08X", (unsigned int)Result);
return (Result);
return Result;
}

return (CFE_SUCCESS);
return CFE_SUCCESS;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand Down Expand Up @@ -962,5 +962,5 @@ int32 LC_LoadDefaultTables(void)
}
}

return (Result);
return Result;
}
2 changes: 1 addition & 1 deletion fsw/src/lc_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ int32 LC_AppPipe(const CFE_SB_Buffer_t *BufPtr)

} /* end MessageID switch */

return (Status);
return Status;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand Down
2 changes: 1 addition & 1 deletion fsw/src/lc_custom.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,5 @@ uint8 LC_CustomFunction(uint16 WatchIndex, uint32 ProcessedWPData, const CFE_SB_

} /* end WatchIndex switch */

return (EvalResult);
return EvalResult;
}
16 changes: 8 additions & 8 deletions fsw/src/lc_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ bool LC_VerifyMsgLength(const CFE_MSG_Message_t *MsgPtr, size_t ExpectedLength)
result = false;
}

return (result);
return result;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand Down Expand Up @@ -144,7 +144,7 @@ int32 LC_ManageTables(void)
{
CFE_EVS_SendEvent(LC_WDT_GETADDR_ERR_EID, CFE_EVS_EventType_ERROR, "Error getting WDT address, RC=0x%08X",
(unsigned int)Result);
return (Result);
return Result;
}

Result = CFE_TBL_GetAddress((void *)&LC_OperData.ADTPtr, LC_OperData.ADTHandle);
Expand All @@ -160,10 +160,10 @@ int32 LC_ManageTables(void)
{
CFE_EVS_SendEvent(LC_ADT_GETADDR_ERR_EID, CFE_EVS_EventType_ERROR, "Error getting ADT address, RC=0x%08X",
(unsigned int)Result);
return (Result);
return Result;
}

return (CFE_SUCCESS);
return CFE_SUCCESS;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand All @@ -185,7 +185,7 @@ int32 LC_UpdateTaskCDS(void)
{
CFE_EVS_SendEvent(LC_WRT_NO_SAVE_ERR_EID, CFE_EVS_EventType_ERROR,
"Unable to update watchpoint results in CDS, RC=0x%08X", (unsigned int)Result);
return (Result);
return Result;
}

/*
Expand All @@ -197,7 +197,7 @@ int32 LC_UpdateTaskCDS(void)
{
CFE_EVS_SendEvent(LC_ART_NO_SAVE_ERR_EID, CFE_EVS_EventType_ERROR,
"Unable to update actionpoint results in CDS, RC=0x%08X", (unsigned int)Result);
return (Result);
return Result;
}

/*
Expand All @@ -214,10 +214,10 @@ int32 LC_UpdateTaskCDS(void)
{
CFE_EVS_SendEvent(LC_APP_NO_SAVE_START_ERR_EID, CFE_EVS_EventType_ERROR,
"Unable to update application data in CDS, RC=0x%08X", (unsigned int)Result);
return (Result);
return Result;
}

return (CFE_SUCCESS);
return CFE_SUCCESS;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand Down
22 changes: 11 additions & 11 deletions fsw/src/lc_watch.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ LC_WatchPtList_t *LC_AddWatchpoint(CFE_SB_MsgId_t MessageID)
}

/* Return pointer to last link in watchpoint linked list */
return (WatchPtLink);
return WatchPtLink;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand Down Expand Up @@ -535,7 +535,7 @@ uint8 LC_OperatorCompare(uint16 WatchIndex, uint32 ProcessedWPData)
break;
}

return (EvalResult);
return EvalResult;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand Down Expand Up @@ -588,7 +588,7 @@ uint8 LC_SignedCompare(uint16 WatchIndex, int32 WPValue, int32 CompareValue)
break;
}

return (EvalResult);
return EvalResult;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand Down Expand Up @@ -641,7 +641,7 @@ uint8 LC_UnsignedCompare(uint16 WatchIndex, uint32 WPValue, uint32 CompareValue)
break;
}

return (EvalResult);
return EvalResult;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand Down Expand Up @@ -727,7 +727,7 @@ uint8 LC_FloatCompare(uint16 WatchIndex, LC_MultiType_t *WPMultiType, LC_MultiTy
EvalResult = LC_WATCH_ERROR;
}

return (EvalResult);
return EvalResult;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand Down Expand Up @@ -787,7 +787,7 @@ bool LC_WPOffsetValid(uint16 WatchIndex, const CFE_SB_Buffer_t *BufPtr)
LC_OperData.WRTPtr[WatchIndex].WatchResult = LC_WATCH_ERROR;
LC_OperData.WRTPtr[WatchIndex].CountdownToStale = 0;

return (false);
return false;
break;

} /* end switch */
Expand All @@ -811,7 +811,7 @@ bool LC_WPOffsetValid(uint16 WatchIndex, const CFE_SB_Buffer_t *BufPtr)
LC_OperData.WRTPtr[WatchIndex].CountdownToStale = 0;
}

return (OffsetValid);
return OffsetValid;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand Down Expand Up @@ -923,7 +923,7 @@ bool LC_GetSizedWPData(uint16 WatchIndex, const uint8 *WPDataPtr, uint32 *SizedD
/*
** Return success flag
*/
return (Success);
return Success;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand Down Expand Up @@ -1057,7 +1057,7 @@ int32 LC_ValidateWDT(void *TableData)
"WDT verify results: good = %d, bad = %d, unused = %d", (int)GoodCount, (int)BadCount,
(int)UnusedCount);

return (TableResult);
return TableResult;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand Down Expand Up @@ -1091,7 +1091,7 @@ bool LC_Uint32IsNAN(uint32 Data)
}
}

return (Result);
return Result;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand Down Expand Up @@ -1126,5 +1126,5 @@ bool LC_Uint32IsInfinite(uint32 Data)
}
}

return (Result);
return Result;
}

0 comments on commit 25ed5d6

Please sign in to comment.