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

rewrite(components/fatfs): use constant instead number (IDFGH-14472) #15246

Open
3 tasks done
safocl opened this issue Jan 21, 2025 · 1 comment · May be fixed by #15247
Open
3 tasks done

rewrite(components/fatfs): use constant instead number (IDFGH-14472) #15246

safocl opened this issue Jan 21, 2025 · 1 comment · May be fixed by #15247
Assignees
Labels
Status: Opened Issue is new

Comments

@safocl
Copy link

safocl commented Jan 21, 2025

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report

Code contain a magic expression in assert

assert(wl_handle + 1);

I suggest replacing it with
assert(wl_handle != WL_INVALID_HANDLE);
edited (error corrected)

@espressif-bot espressif-bot added the Status: Opened Issue is new label Jan 21, 2025
@github-actions github-actions bot changed the title rewrite(components/fatfs): use constant instead number rewrite(components/fatfs): use constant instead number (IDFGH-14472) Jan 21, 2025
@safocl
Copy link
Author

safocl commented Jan 21, 2025

I wonder if values lower than -1 will be valid? Is it necessary to put the isGreater operator (value > INVALID_VALUE_CONSTANT) in such a check?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Opened Issue is new
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants