Skip to content

Use size_t for size parameters/variables #113

@thnkslprpt

Description

@thnkslprpt

Checklist

  • I reviewed the Contributing Guide.
  • I performed a cursory search to see if the bug report is relevant, not redundant, nor in conflict with other tickets.

Describe the bug
A few variables/parameters representing size could be updated to the more expressive size_t typedef.

Code snips
DataLength should be size_t:

DS/fsw/src/ds_file.h

Lines 121 to 127 in 2a6c6a2

* \param[in] FileIndex Destination file index
* \param[in] FileData Pointer to packet data
* \param[in] DataLength Length of packet data
*
* \sa #DS_AppFileStatus_t, #DS_DestFileEntry_t
*/
void DS_FileWriteData(int32 FileIndex, const void *FileData, uint32 DataLength);

MaxFileSize should be size_t:

DS/fsw/src/ds_table.h

Lines 353 to 357 in 2a6c6a2

* \param[in] MaxFileSize Maximum Size Limit value
*
* \sa #DS_TableVerifyAge, #DS_TableVerifyCount, #DS_DestFileEntry_t
*/
bool DS_TableVerifySize(uint32 MaxFileSize);

...and a few other local variables.

Expected behavior
Update to size_t where possible.

Reporter Info
Avi Weiss @thnkslprpt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions