-
Notifications
You must be signed in to change notification settings - Fork 200
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
Document/verify CFE_RESOURCEID_MAX
is power of 2 - 1 and sometimes used as MASK (and MAX)
#1365
Comments
jphickey
added a commit
to jphickey/cFE
that referenced
this issue
Apr 16, 2021
Add a compile time assert to ensure that this value is actually a power of two-1. Notes in the comments that it serves as both a numeric limit and a mask.
jphickey
added a commit
to jphickey/cFE
that referenced
this issue
Apr 16, 2021
Add a compile time assert to ensure that this value is actually a power of two-1. Notes in the comments that it serves as both a numeric limit and a mask.
astrogeco
added a commit
that referenced
this issue
Apr 28, 2021
Fix #1365, assert CFE_RESOURCEID_MAX is a bitmask
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
CFE_RESOURCEID_MAX
is used in some places as MAX and others as a mask, also has to be power of 2 - 1:cFE/modules/resourceid/fsw/src/cfe_resourceid_api.c
Line 52 in e80aae9
Describe the solution you'd like
Document and verify
Describe alternatives you've considered
None
Additional context
Code review
Requester Info
Jacob Hageman - NASA/GSFC
The text was updated successfully, but these errors were encountered: