-
Notifications
You must be signed in to change notification settings - Fork 203
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
CFE_ES_PoolCreateEx NumBlockSizes error handling #1485
Comments
I would vote to make the header/documentation match what the implementation does. Passing in a bad value should be an error. |
That's fine but the implementation for when NumBLocksSizes equals 0 is weird. It will be set to the default only when BlockSizes is null, and will stay as 0 when BlockSizes isn't null. |
Yeah, it is kinda weird, but I vaguely recall preserving that "feature" of the API (only use default set if the pointer is NULL, regardless of NumBlockSizes). Didn't want to break any code that might be depending on that. I wouldn't want to change the behavior at this point - we should keep it as being the BlockSizes pointer (NULL or not NULL) that controls whether defaults are used. As for the case of a |
Let's just update the documentation to match the behavior for now (Caelum), feel free to open a future work issue to make the implementation make more sense. |
Fix #1485, Document CFE_ES_PoolCreateEx NumBlockSizes error handling
Describe the bug
In the header file of CFE_ES_PoolCreateEx, for parameter NumBlockSizes it says "If set equal to zero or if greater than 17, then default block sizes are used." In the code though if NumBLockSizes is greater than CFE_PLATFORM_ES_POOL_MAX_BUCKETS (which is set to 17) then it returns error code CFE_ES_BAD_ARGUMENT.
Expected behavior
The header and functionality should match.
Reporter Info
Alex Campbell GSFC
The text was updated successfully, but these errors were encountered: