Skip to content

Commit

Permalink
Fix #2162, Remove redundant 'end of function' comments
Browse files Browse the repository at this point in the history
  • Loading branch information
thnkslprpt committed Oct 6, 2022
1 parent 48165fa commit 13dd1b6
Show file tree
Hide file tree
Showing 20 changed files with 251 additions and 251 deletions.
18 changes: 9 additions & 9 deletions modules/es/fsw/src/cfe_es_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ CFE_Status_t CFE_ES_ResetCFE(uint32 ResetType)
*/
CFE_PSP_Restart(CFE_PSP_RST_TYPE_PROCESSOR);

} /* end if */
}

/*
** If the BSP routine is not implemented,
Expand Down Expand Up @@ -212,7 +212,7 @@ CFE_Status_t CFE_ES_RestartApp(CFE_ES_AppId_t AppID)
CFE_ES_WriteToSysLog("%s: Invalid Application ID received, AppID = %lu\n", __func__,
CFE_RESOURCEID_TO_ULONG(AppID));

} /* end if */
}

return ReturnCode;
}
Expand Down Expand Up @@ -457,7 +457,7 @@ void CFE_ES_ExitApp(uint32 ExitStatus)
OS_TaskDelay(500);
}

} /* end if */
}

} /* end if ReturnCode == CFE_SUCCESS */

Expand Down Expand Up @@ -1411,10 +1411,10 @@ CFE_Status_t CFE_ES_DeleteChildTask(CFE_ES_TaskId_t TaskId)
*/
TaskIsMain = true;
break;
} /* end if */
} /* end if */
}
}
++AppRecPtr;
} /* end for */
}

if (TaskIsMain == false)
{
Expand Down Expand Up @@ -1463,7 +1463,7 @@ CFE_Status_t CFE_ES_DeleteChildTask(CFE_ES_TaskId_t TaskId)
CFE_RESOURCEID_TO_ULONG(TaskId));
ReturnCode = CFE_ES_ERR_RESOURCEID_NOT_VALID;

} /* end if */
}

CFE_ES_UnlockSharedData(__func__, __LINE__);
}
Expand Down Expand Up @@ -2161,7 +2161,7 @@ void CFE_ES_LockSharedData(const char *FunctionName, int32 LineNumber)
CFE_ES_SysLogWrite_Unsync("%s: SharedData Mutex Take Err Stat=%ld,Func=%s,Line=%d\n", __func__, (long)OsStatus,
FunctionName, (int)LineNumber);

} /* end if */
}
}

/*----------------------------------------------------------------
Expand All @@ -2184,7 +2184,7 @@ void CFE_ES_UnlockSharedData(const char *FunctionName, int32 LineNumber)
CFE_ES_SysLogWrite_Unsync("%s: SharedData Mutex Give Err Stat=%ld,Func=%s,Line=%d\n", __func__, (long)OsStatus,
FunctionName, (int)LineNumber);

} /* end if */
}
}

/*----------------------------------------------------------------
Expand Down
8 changes: 4 additions & 4 deletions modules/es/fsw/src/cfe_es_apps.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ void CFE_ES_StartApplications(uint32 ResetType, const char *StartFilePath)
__func__, (unsigned int)Status);
}

} /* end if */
}

/*
** This if block covers two cases: A Power on reset, and a Processor reset when
Expand Down Expand Up @@ -1054,7 +1054,7 @@ bool CFE_ES_RunAppTableScan(uint32 ElapsedTime, void *Arg)
AppPtr->ControlReq.AppTimerMsec = CFE_PLATFORM_ES_APP_KILL_TIMEOUT * CFE_PLATFORM_ES_APP_SCAN_RATE;
}

} /* end if */
}

++AppPtr;

Expand Down Expand Up @@ -1379,7 +1379,7 @@ int32 CFE_ES_CleanUpApp(CFE_ES_AppId_t AppId)
}

++TaskRecPtr;
} /* end for */
}

CFE_ES_Global.RegisteredTasks -= NumTasks;

Expand All @@ -1397,7 +1397,7 @@ int32 CFE_ES_CleanUpApp(CFE_ES_AppId_t AppId)
}

++MemPoolRecPtr;
} /* end for */
}

/*
* Set the record to RESERVED.
Expand Down
2 changes: 1 addition & 1 deletion modules/es/fsw/src/cfe_es_erlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ bool CFE_ES_RunExceptionScan(uint32 ElapsedTime, void *Arg)
(long)PspStatus);
PspContextId = 0;
ExceptionTaskID = OS_OBJECT_ID_UNDEFINED;
} /* end if */
}

/*
* Note that writes to the ES ER log actually do not get propagated to the debug console.
Expand Down
12 changes: 6 additions & 6 deletions modules/es/fsw/src/cfe_es_perf.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,14 +182,14 @@ int32 CFE_ES_StartPerfDataCmd(const CFE_ES_StartPerfDataCmd_t *data)
CFE_EVS_SendEvent(CFE_ES_PERF_STARTCMD_TRIG_ERR_EID, CFE_EVS_EventType_ERROR,
"Cannot start collecting performance data, trigger mode (%d) out of range (%d to %d)",
(int)CmdPtr->TriggerMode, (int)CFE_ES_PERF_TRIGGER_START, (int)CFE_ES_PERF_TRIGGER_END);
} /* end if */
}
}
else
{
CFE_ES_Global.TaskData.CommandErrorCounter++;
CFE_EVS_SendEvent(CFE_ES_PERF_STARTCMD_ERR_EID, CFE_EVS_EventType_ERROR,
"Cannot start collecting performance data,perf data write in progress");
} /* end if */
}

return CFE_SUCCESS;
}
Expand Down Expand Up @@ -252,7 +252,7 @@ int32 CFE_ES_StopPerfDataCmd(const CFE_ES_StopPerfDataCmd_t *data)
CFE_ES_Global.TaskData.CommandErrorCounter++;
CFE_EVS_SendEvent(CFE_ES_PERF_STOPCMD_ERR2_EID, CFE_EVS_EventType_ERROR,
"Stop performance data cmd ignored,perf data write in progress");
} /* end if */
}

return CFE_SUCCESS;
}
Expand Down Expand Up @@ -400,7 +400,7 @@ bool CFE_ES_RunPerfLogDump(uint32 ElapsedTime, void *Arg)
if (!OS_ObjectIdDefined(State->FileDesc))
{
State->PendingState = CFE_ES_PerfDumpState_IDLE;
} /* end if */
}
break;

case CFE_ES_PerfDumpState_WRITE_PERF_ENTRIES:
Expand Down Expand Up @@ -594,10 +594,10 @@ void CFE_ES_PerfLogAdd(uint32 Marker, uint32 EntryExit)
CFE_ES_WriteToSysLog("%s: Invalid performance marker %d,max is %d\n", __func__, (unsigned int)Marker,
(CFE_MISSION_ES_PERF_MAX_IDS - 1));
Perf->MetaData.InvalidMarkerReported = true;
} /* end if */
}

return;
} /* end if */
}

/*
* check if this ID is filtered.
Expand Down
6 changes: 3 additions & 3 deletions modules/es/fsw/src/cfe_es_start.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ void CFE_ES_Main(uint32 StartType, uint32 StartSubtype, uint32 ModeId, const cha
* Normally CFE_PSP_Panic() will not return but it will under UT
*/
return;
} /* end if */
}

/*
** Initialize the Reset variables. This call is required
Expand Down Expand Up @@ -433,7 +433,7 @@ void CFE_ES_SetupResetVariables(uint32 StartType, uint32 StartSubtype, uint32 Bo
"PROCESSOR RESET due to Watchdog (Watchdog).");
}

} /* end if */
}
}
/*
** If a processor reset is due to a command or exception, the reset has already been logged.
Expand Down Expand Up @@ -853,7 +853,7 @@ void CFE_ES_CreateObjects(void)
*/
CFE_PSP_Panic(CFE_PSP_PANIC_CORE_APP);

} /* end if */
}
}
else
{
Expand Down
4 changes: 2 additions & 2 deletions modules/es/fsw/src/cfe_es_syslog.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ int32 CFE_ES_SysLogDump(const char *Filename)
CFE_EVS_SendEvent(CFE_ES_SYSLOG2_ERR_EID, CFE_EVS_EventType_ERROR, "Error creating file %s, RC = %ld", Filename,
(long)OsStatus);
return CFE_ES_FILE_IO_ERR;
} /* end if */
}

CFE_FS_InitHeader(&Buffer.FileHdr, CFE_ES_SYS_LOG_DESC, CFE_FS_SubType_ES_SYSLOG);

Expand Down Expand Up @@ -485,7 +485,7 @@ int32 CFE_ES_SysLogDump(const char *Filename)
if (OsStatus <= 0)
{
break;
} /* end if */
}

WritePos += (long)OsStatus;
TotalSize += (long)OsStatus;
Expand Down
14 changes: 7 additions & 7 deletions modules/es/fsw/src/cfe_es_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ void CFE_ES_TaskMain(void)
*/
AppRunStatus = CFE_ES_RunStatus_CORE_APP_INIT_ERROR;

} /* end if */
}

/*
* Wait for other apps to start.
Expand Down Expand Up @@ -163,7 +163,7 @@ void CFE_ES_TaskMain(void)
*/
AppRunStatus = CFE_ES_RunStatus_CORE_APP_RUNTIME_ERROR;

} /* end if */
}

} /* end while */

Expand Down Expand Up @@ -1263,7 +1263,7 @@ int32 CFE_ES_QueryAllCmd(const CFE_ES_QueryAllCmd_t *data)
* the full extent of the error recovery has been done
*/
return CFE_SUCCESS;
} /* end if */
}

/*
** Maintain statistics of amount of data written to file
Expand Down Expand Up @@ -1297,7 +1297,7 @@ int32 CFE_ES_QueryAllCmd(const CFE_ES_QueryAllCmd_t *data)
* the full extent of the error recovery has been done
*/
return CFE_SUCCESS;
} /* end if */
}

FileSize += sizeof(CFE_ES_AppInfo_t);
EntryCount++;
Expand Down Expand Up @@ -1415,7 +1415,7 @@ int32 CFE_ES_QueryAllTasksCmd(const CFE_ES_QueryAllTasksCmd_t *data)
* the full extent of the error recovery has been done
*/
return CFE_SUCCESS;
} /* end if */
}

/*
** Maintain statistics of amount of data written to file
Expand Down Expand Up @@ -1449,7 +1449,7 @@ int32 CFE_ES_QueryAllTasksCmd(const CFE_ES_QueryAllTasksCmd_t *data)
* the full extent of the error recovery has been done
*/
return CFE_SUCCESS;
} /* end if */
}

FileSize += sizeof(CFE_ES_TaskInfo_t);
EntryCount++;
Expand Down Expand Up @@ -1567,7 +1567,7 @@ int32 CFE_ES_WriteSysLogCmd(const CFE_ES_WriteSysLogCmd_t *data)
else
{
CFE_ES_Global.TaskData.CommandErrorCounter++;
} /* end if */
}

return CFE_SUCCESS;
}
Expand Down
6 changes: 3 additions & 3 deletions modules/es/ut-coverage/es_UT.c
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ void ES_ResetUnitTest(void)
* so it must be re-initialized here every time CFE_ES_Global is reset.
*/
CFE_ES_Global.ResetDataPtr = ES_UT_PersistentResetData;
} /* end ES_ResetUnitTest() */
}

void TestInit(void)
{
Expand Down Expand Up @@ -3518,7 +3518,7 @@ void TestTask(void)
UT_SetHandlerFunction(UT_KEY(CFE_Config_IterateAll), ES_UT_Config_IterateAll, NULL);
UtAssert_VOIDCALL(CFE_ES_TaskInit());
CFE_UtAssert_PRINTF("Error sending mission version event");
} /* end TestTask */
}

void TestPerf(void)
{
Expand Down Expand Up @@ -5014,7 +5014,7 @@ void TestCDS()
CFE_ES_Global.CDSIsAvailable = false;
UtAssert_INT32_EQ(CFE_ES_GetCDSBlockIDByName(&CDSHandle, "NotNULL"), CFE_ES_NOT_IMPLEMENTED);
UtAssert_INT32_EQ(CFE_ES_GetCDSBlockName(CDSName, CDSHandle, sizeof(CDSName)), CFE_ES_NOT_IMPLEMENTED);
} /* End TestCDS */
}

void TestCDSMempool(void)
{
Expand Down
4 changes: 2 additions & 2 deletions modules/evs/fsw/src/cfe_evs_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ void CFE_EVS_TaskMain(void)
CFE_ES_PerfLogExit(CFE_MISSION_EVS_MAIN_PERF_ID);
/* Note: CFE_ES_ExitApp will not return */
CFE_ES_ExitApp(CFE_ES_RunStatus_CORE_APP_INIT_ERROR);
} /* end if */
}

/*
* Wait for other apps to start.
Expand Down Expand Up @@ -242,7 +242,7 @@ void CFE_EVS_TaskMain(void)
else
{
CFE_ES_WriteToSysLog("%s: Error reading cmd pipe,RC=0x%08X\n", __func__, (unsigned int)Status);
} /* end if */
}

} /* end while */

Expand Down
4 changes: 2 additions & 2 deletions modules/fs/fsw/src/cfe_fs_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@ bool CFE_FS_RunBackgroundFileDump(uint32 ElapsedTime, void *Arg)

++State->RecordNum;

} /* end if */
}

/* On normal EOF close the file and generate the complete event */
if (IsEOF)
Expand Down Expand Up @@ -815,7 +815,7 @@ bool CFE_FS_RunBackgroundFileDump(uint32 ElapsedTime, void *Arg)

CFE_FS_UnlockSharedData(__func__);

} /* end if */
}

return !IsEOF;
}
Expand Down
6 changes: 3 additions & 3 deletions modules/fs/fsw/src/cfe_fs_priv.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ int32 CFE_FS_EarlyInit(void)
{
CFE_ES_WriteToSysLog("%s: Shared Data Mutex creation failed! RC=%ld\n", __func__, (long)OsStatus);
return CFE_STATUS_EXTERNAL_RESOURCE_FAIL;
} /* end if */
}

return CFE_SUCCESS;
}
Expand All @@ -80,7 +80,7 @@ void CFE_FS_LockSharedData(const char *FunctionName)
CFE_ES_WriteToSysLog("%s: SharedData Mutex Take Err Stat=%ld,App=%lu,Function=%s\n", __func__, (long)OsStatus,
CFE_RESOURCEID_TO_ULONG(AppId), FunctionName);

} /* end if */
}
}

/*----------------------------------------------------------------
Expand All @@ -101,5 +101,5 @@ void CFE_FS_UnlockSharedData(const char *FunctionName)
CFE_ES_WriteToSysLog("%s: SharedData Mutex Give Err Stat=%ld,App=%lu,Function=%s\n", __func__, (long)OsStatus,
CFE_RESOURCEID_TO_ULONG(AppId), FunctionName);

} /* end if */
}
}
Loading

0 comments on commit 13dd1b6

Please sign in to comment.