Skip to content

Commit

Permalink
Merge pull request nasa#44 from thnkslprpt/fix-43-comment-and-empty-l…
Browse files Browse the repository at this point in the history
…ine-cleanup

Fix nasa#43, Remove redundant/inconsistent comments (/* end of function */, /* end if */ etc.) and clean up empty lines.
  • Loading branch information
dzbaker authored Oct 17, 2022
2 parents b41dbd7 + 9eb357a commit 543cf6b
Show file tree
Hide file tree
Showing 20 changed files with 328 additions and 601 deletions.
21 changes: 9 additions & 12 deletions fsw/src/lc_action.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ void LC_SampleAPs(uint16 StartIndex, uint16 EndIndex)
LC_SampleSingleAP(TableIndex);
}
}
} /* end LC_SampleAP */

return;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand Down Expand Up @@ -265,7 +267,9 @@ void LC_SampleSingleAP(uint16 APNumber)
}

} /* end CurrentAPState if */
} /* end LC_SampleSingleAP */

return;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand Down Expand Up @@ -468,8 +472,7 @@ uint8 LC_EvaluateRPN(uint16 APNumber)
}

return EvalResult;

} /* end LC_EvaluateRPN */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand Down Expand Up @@ -598,8 +601,7 @@ int32 LC_ValidateADT(void *TableData)
(int)UnusedCount);

return TableResult;

} /* end LC_ValidateADT */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand Down Expand Up @@ -698,9 +700,4 @@ int32 LC_ValidateRPN(const uint16 *RPNPtr, int32 *IndexValue, int32 *StackDepthV
}

return Result;

} /* end LC_ValidateRPN */

/************************/
/* End of File Comment */
/************************/
}
31 changes: 9 additions & 22 deletions fsw/src/lc_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,7 @@ void LC_AppMain(void)
** Exit the application
*/
CFE_ES_ExitApp(RunStatus);

} /* end LC_AppMain */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand Down Expand Up @@ -221,8 +220,7 @@ int32 LC_AppInit(void)
}

return Status;

} /* end LC_AppInit */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand Down Expand Up @@ -250,8 +248,7 @@ int32 LC_EvsInit(void)
}

return Status;

} /* end LC_EvsInit */
}

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

return Status;

} /* end LC_SbInit */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand Down Expand Up @@ -489,8 +485,7 @@ int32 LC_TableInit(void)
}

return CFE_SUCCESS;

} /* LC_TableInit() */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand Down Expand Up @@ -566,8 +561,7 @@ int32 LC_CreateResultTables(void)
}

return Result;

} /* LC_CreateResultTables() */
}

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

return Result;

} /* LC_CreateDefinitionTables() */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand Down Expand Up @@ -851,8 +844,7 @@ int32 LC_CreateTaskCDS(void)
}

return CFE_SUCCESS;

} /* LC_CreateTaskCDS() */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand Down Expand Up @@ -971,9 +963,4 @@ int32 LC_LoadDefaultTables(void)
}

return Result;

} /* LC_LoadDefaultTables() */

/************************/
/* End of File Comment */
/************************/
}
2 changes: 0 additions & 2 deletions fsw/src/lc_app.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ typedef struct LC_WListTag

uint16 WatchIndex; /**< \brief Watchpoint table index */
uint16 Spare; /**< \brief Structure alignment pad */

} LC_WatchPtList_t;

/** \brief Linked list of MessageID's with same hash function result */
Expand All @@ -132,7 +131,6 @@ typedef struct LC_MListTag
uint16 Spare; /**< \brief Structure alignment pad */

LC_WatchPtList_t *WatchPtList; /**< \brief Watchpoint list for this MessageID */

} LC_MessageList_t;

/************************************************************************
Expand Down
52 changes: 34 additions & 18 deletions fsw/src/lc_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ int32 LC_AppPipe(const CFE_SB_Buffer_t *BufPtr)
} /* end MessageID switch */

return Status;

} /* End LC_AppPipe */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand Down Expand Up @@ -198,7 +197,9 @@ void LC_SampleAPReq(const CFE_SB_Buffer_t *BufPtr)
}
}
}
} /* end LC_SampleAPReq */

return;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand Down Expand Up @@ -484,8 +485,7 @@ int32 LC_HousekeepingReq(const CFE_MSG_CommandHeader_t *MsgPtr)
Result = LC_PerformMaintenance();

return Result;

} /* end LC_HousekeepingReq */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand All @@ -506,7 +506,9 @@ void LC_NoopCmd(const CFE_SB_Buffer_t *BufPtr)
CFE_EVS_SendEvent(LC_NOOP_INF_EID, CFE_EVS_EventType_INFORMATION, "No-op command: Version %d.%d.%d.%d",
LC_MAJOR_VERSION, LC_MINOR_VERSION, LC_REVISION, LC_MISSION_REV);
}
} /* end LC_NoopCmd */

return;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand All @@ -526,7 +528,9 @@ void LC_ResetCmd(const CFE_SB_Buffer_t *BufPtr)

CFE_EVS_SendEvent(LC_RESET_DBG_EID, CFE_EVS_EventType_DEBUG, "Reset counters command");
}
} /* end LC_ResetCmd */

return;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand All @@ -542,7 +546,9 @@ void LC_ResetCounters(void)
LC_AppData.MonitoredMsgCount = 0;
LC_AppData.RTSExecCount = 0;
LC_AppData.PassiveRTSExecCount = 0;
} /* end LC_ResetCounters */

return;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand Down Expand Up @@ -581,7 +587,9 @@ void LC_SetLCStateCmd(const CFE_SB_Buffer_t *BufPtr)
break;
}
}
} /* end LC_SetLCStateCmd */

return;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand Down Expand Up @@ -709,7 +717,9 @@ void LC_SetAPStateCmd(const CFE_SB_Buffer_t *BufPtr)
} /* end ValidState if */

} /* end LC_VerifyMsgLength if */
} /* end LC_SetAPStateCmd */

return;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand Down Expand Up @@ -774,7 +784,9 @@ void LC_SetAPPermOffCmd(const CFE_SB_Buffer_t *BufPtr)
} /* end CmdPtr -> APNumber else */

} /* end LC_VerifyMsgLength if */
} /* end LC_SetAPPermOffCmd */

return;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand Down Expand Up @@ -818,7 +830,9 @@ void LC_ResetAPStatsCmd(const CFE_SB_Buffer_t *BufPtr)
CmdPtr->APNumber);
}
}
} /* end LC_ResetAPStatsCmd */

return;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand Down Expand Up @@ -848,7 +862,9 @@ void LC_ResetResultsAP(uint32 StartIndex, uint32 EndIndex, bool ResetStatsCmd)
LC_OperData.ARTPtr[TableIndex].CumulativeRTSExecCount = 0;
LC_OperData.ARTPtr[TableIndex].CumulativeEventMsgsSent = 0;
}
} /* end LC_ResetResultsAP */

return;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand Down Expand Up @@ -892,7 +908,9 @@ void LC_ResetWPStatsCmd(const CFE_SB_Buffer_t *BufPtr)
CmdPtr->WPNumber);
}
}
} /* end LC_ResetWPStatsCmd */

return;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand Down Expand Up @@ -926,8 +944,6 @@ void LC_ResetResultsWP(uint32 StartIndex, uint32 EndIndex, bool ResetStatsCmd)
LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Timestamp.Seconds = 0;
LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Timestamp.Subseconds = 0;
}
} /* end LC_ResetResultsWP */

/************************/
/* End of File Comment */
/************************/
return;
}
11 changes: 4 additions & 7 deletions fsw/src/lc_custom.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ void LC_ExecuteRTS(uint16 RTSId)
RTSRequest.RTSId = RTSId;

CFE_SB_TransmitMsg(&RTSRequest.CmdHeader.Msg, true);
} /* end LC_ExecuteRTS */

return;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand Down Expand Up @@ -88,9 +90,4 @@ uint8 LC_CustomFunction(uint16 WatchIndex, uint32 ProcessedWPData, const CFE_SB_
} /* end WatchIndex switch */

return EvalResult;

} /* end LC_CustomFunction */

/************************/
/* End of File Comment */
/************************/
}
2 changes: 0 additions & 2 deletions fsw/src/lc_tbl.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ typedef struct
uint8 Padding[3]; /**< \brief Structure padding */

CFE_TIME_SysTime_t Timestamp; /**< \brief Timstamp when the transition was detected */

} LC_WRTTransition_t;

/**
Expand All @@ -157,7 +156,6 @@ typedef struct
has evaluated to TRUE */
LC_WRTTransition_t LastFalseToTrue; /**< \brief Last transition from FALSE to TRUE */
LC_WRTTransition_t LastTrueToFalse; /**< \brief Last transition from TRUE to FALSE */

} LC_WRTEntry_t;

/**
Expand Down
9 changes: 3 additions & 6 deletions fsw/src/lc_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@ bool LC_VerifyMsgLength(const CFE_MSG_Message_t *MsgPtr, size_t ExpectedLength)
}

return result;

} /* End of LC_VerifyMsgLength */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand Down Expand Up @@ -165,8 +164,7 @@ int32 LC_ManageTables(void)
}

return CFE_SUCCESS;

} /* LC_ManageTables() */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand Down Expand Up @@ -220,8 +218,7 @@ int32 LC_UpdateTaskCDS(void)
}

return CFE_SUCCESS;

} /* LC_UpdateTaskCDS() */
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand Down
Loading

0 comments on commit 543cf6b

Please sign in to comment.