Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #39, Remove unnecessary parentheses around return values. #40

Merged
merged 1 commit into from
Oct 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions fsw/src/lc_action.c
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ uint8 LC_EvaluateRPN(uint16 APNumber)
EvalResult = LC_ACTION_FAIL;
}

return (EvalResult);
return EvalResult;

} /* end LC_EvaluateRPN */

Expand Down Expand Up @@ -603,7 +603,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;

} /* end LC_ValidateADT */

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

return (Result);
return Result;

} /* end LC_ValidateRPN */

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

return (Status);
return Status;

} /* end LC_AppInit */

Expand Down Expand Up @@ -249,7 +249,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;

} /* end LC_EvsInit */

Expand Down Expand Up @@ -319,7 +319,7 @@ int32 LC_SbInit(void)
}
}

return (Status);
return Status;

} /* end LC_SbInit */

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

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

/*
Expand Down Expand Up @@ -435,7 +435,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 @@ -447,15 +447,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 @@ -488,7 +488,7 @@ int32 LC_TableInit(void)
(unsigned int)LC_OperData.TableResults);
}

return (CFE_SUCCESS);
return CFE_SUCCESS;

} /* LC_TableInit() */

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

return (Result);
return Result;

} /* LC_CreateResultTables() */

Expand Down Expand Up @@ -722,7 +722,7 @@ int32 LC_CreateDefinitionTables(void)
}
}

return (Result);
return Result;

} /* LC_CreateDefinitionTables() */

Expand Down Expand Up @@ -768,7 +768,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 @@ -802,7 +802,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 @@ -847,10 +847,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;

} /* LC_CreateTaskCDS() */

Expand Down Expand Up @@ -970,7 +970,7 @@ int32 LC_LoadDefaultTables(void)
}
}

return (Result);
return Result;

} /* LC_LoadDefaultTables() */

Expand Down
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;

} /* End LC_AppPipe */

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 @@ -90,7 +90,7 @@ uint8 LC_CustomFunction(uint16 WatchIndex, uint32 ProcessedWPData, const CFE_SB_

} /* end WatchIndex switch */

return (EvalResult);
return EvalResult;

} /* end LC_CustomFunction */

Expand Down
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;

} /* End of LC_VerifyMsgLength */

Expand Down Expand Up @@ -145,7 +145,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 @@ -161,10 +161,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;

} /* LC_ManageTables() */

Expand All @@ -187,7 +187,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 @@ -199,7 +199,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 @@ -216,10 +216,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;

} /* LC_UpdateTaskCDS() */

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 @@ -236,7 +236,7 @@ LC_WatchPtList_t *LC_AddWatchpoint(CFE_SB_MsgId_t MessageID)
}

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

} /* End of LC_AddWatchpoint() */

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

return (EvalResult);
return EvalResult;

} /* end LC_OperatorCompare */

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

return (EvalResult);
return EvalResult;

} /* end LC_SignedCompare */

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

return (EvalResult);
return EvalResult;

} /* end LC_UnsignedCompare */

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

return (EvalResult);
return EvalResult;

} /* end LC_FloatCompare */

Expand Down Expand Up @@ -796,7 +796,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 @@ -820,7 +820,7 @@ bool LC_WPOffsetValid(uint16 WatchIndex, const CFE_SB_Buffer_t *BufPtr)
LC_OperData.WRTPtr[WatchIndex].CountdownToStale = 0;
}

return (OffsetValid);
return OffsetValid;

} /* end LC_WPOffsetValid */

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

} /* end LC_GetSizedWPData */

Expand Down Expand Up @@ -1068,7 +1068,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;

} /* end LC_ValidateWDT */

Expand Down Expand Up @@ -1103,7 +1103,7 @@ bool LC_Uint32IsNAN(uint32 Data)
}
}

return (Result);
return Result;

} /* end LC_Uint32IsNAN */

Expand Down Expand Up @@ -1139,7 +1139,7 @@ bool LC_Uint32IsInfinite(uint32 Data)
}
}

return (Result);
return Result;

} /* end LC_Uint32IsInfinite */

Expand Down