Skip to content
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

Use size_t for size parameters/variables #113

Open
2 tasks done
thnkslprpt opened this issue Jun 14, 2023 · 0 comments · May be fixed by #114
Open
2 tasks done

Use size_t for size parameters/variables #113

thnkslprpt opened this issue Jun 14, 2023 · 0 comments · May be fixed by #114

Comments

@thnkslprpt
Copy link
Contributor

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

thnkslprpt added a commit to thnkslprpt/DS that referenced this issue Jun 14, 2023
@thnkslprpt thnkslprpt linked a pull request Jun 14, 2023 that will close this issue
2 tasks
thnkslprpt added a commit to thnkslprpt/DS that referenced this issue Jun 15, 2023
thnkslprpt added a commit to thnkslprpt/DS that referenced this issue Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant