nasa / CF

The Core Flight System (cFS) CFDP application.
Apache License 2.0
79 stars 45 forks source link

Function names differing only by trailing underscore #110

Closed jphickey closed 2 years ago

jphickey commented 2 years ago

CF has a number of cases where function names differ only in a trailing underscore(s), which is likely to violate some coding standards because they look too similar and can be easily confused. An example offender is CF_CFDP_TxFile(), CF_CFDP_TxFile_(), and CF_CFDP_TxFile__().

These internal helpers with only trailing underscores should be renamed to something more descriptive to make it clear what the intent of the function really is (e.g. in the example, the double-underscore version seems to be simply a wrapper to initialize the transaction structure ... seems to have nothing to do with sending files at all, really - just a generic initialization helper).

jphickey commented 2 years ago

This was originally noted in #42 but split to a separate work item

jphickey commented 2 years ago

After PR #137 (which fixes a few) the following name issues remain:

CF_CFDPCycleTx CF_CFDPTxFile CF_CFDPPlaybackDir CFDoSuspRes CFCmdCancel CFCmdAbandon CFFindTransactionBySequenceNumber CFTraverseAllTransactions