-
Notifications
You must be signed in to change notification settings - Fork 31
Fix #17, consolidate common logic in enable/disable commands #119
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
base: main
Are you sure you want to change the base?
Fix #17, consolidate common logic in enable/disable commands #119
Conversation
/* */ | ||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ | ||
void CS_DisableAppCmd(const CS_NoArgsCmd_t *CmdPtr) | ||
static void CS_DoEnableDisableAppCmd(const CS_NoArgsCmd_t *CmdPtr, uint16 NewState, uint32 EventID) |
Check notice
Code scanning / CodeQL
Long function without assertion Note
/* */ | ||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ | ||
void CS_DisableNameAppCmd(const CS_AppNameCmd_t *CmdPtr) | ||
static void CS_DoEnableDisableNameAppCmd(const CS_AppNameCmd_t *CmdPtr, uint16 NewState, uint32 EventID, |
Check notice
Code scanning / CodeQL
Long function without assertion Note
strncpy(Name, CmdPtr->Payload.Name, sizeof(Name) - 1); | ||
Name[sizeof(Name) - 1] = '\0'; | ||
|
||
if (CS_GetAppResTblEntryByName(&ResultsEntry, Name)) |
Check warning
Code scanning / CodeQL
Side effect in a Boolean expression Warning
|
||
CS_AppData.HkPacket.Payload.CmdCounter++; | ||
if (CS_GetAppDefTblEntryByName(&DefinitionEntry, Name)) |
Check warning
Code scanning / CodeQL
Side effect in a Boolean expression Warning
/* */ | ||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ | ||
void CS_DisableCfeCoreCmd(const CS_NoArgsCmd_t *CmdPtr) | ||
static void CS_DoEnableDisableCfeCoreCmd(const CS_NoArgsCmd_t *CmdPtr, uint16 NewState, uint32 EventID) |
Check notice
Code scanning / CodeQL
Long function without assertion Note
/* */ | ||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ | ||
void CS_EnableEntryIDMemoryCmd(const CS_EntryCmd_t *CmdPtr) | ||
static void CS_DoEnableDisableEntryIDMemoryCmd(const CS_EntryCmd_t *CmdPtr, uint16 NewState, uint32 EnableEventID, |
Check notice
Code scanning / CodeQL
Function too long Note
/* */ | ||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ | ||
void CS_DisableTablesCmd(const CS_NoArgsCmd_t *CmdPtr) | ||
static void CS_DoEnableDisableTablesCmd(const CS_NoArgsCmd_t *CmdPtr, uint16 NewState, uint32 EventID) |
Check notice
Code scanning / CodeQL
Long function without assertion Note
/* */ | ||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ | ||
void CS_DisableNameTablesCmd(const CS_TableNameCmd_t *CmdPtr) | ||
static void CS_DoEnableDisableNameTablesCmd(const CS_TableNameCmd_t *CmdPtr, uint16 NewState, uint32 EventID, |
Check notice
Code scanning / CodeQL
Long function without assertion Note
strncpy(Name, CmdPtr->Payload.Name, sizeof(Name) - 1); | ||
Name[sizeof(Name) - 1] = '\0'; | ||
|
||
if (CS_GetTableResTblEntryByName(&ResultsEntry, Name)) |
Check warning
Code scanning / CodeQL
Side effect in a Boolean expression Warning
} | ||
|
||
CS_AppData.HkPacket.Payload.CmdCounter++; | ||
if (CS_GetTableDefTblEntryByName(&DefinitionEntry, Name)) |
Check warning
Code scanning / CodeQL
Side effect in a Boolean expression Warning
Checklist
Describe the contribution
Testing performed
GitHub CI actions all passing successfully (incl. Build + Run, Unit/Functional Tests etc.).
100% test coverage is maintained.
Expected behavior changes
Behavior is unchanged - the same enable/disable functions exist but call helpers where all common logic is consolidated.
System(s) tested on
Debian 12 using the current main branch of cFS bundle.
Contributor Info
Avi Weiss @thnkslprpt