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

CFE_TBL_INFO_TABLE_LOCKED should be a negative error code #2260

Open
2 tasks done
thnkslprpt opened this issue Mar 23, 2023 · 0 comments · May be fixed by #2261
Open
2 tasks done

CFE_TBL_INFO_TABLE_LOCKED should be a negative error code #2260

thnkslprpt opened this issue Mar 23, 2023 · 0 comments · May be fixed by #2261

Comments

@thnkslprpt
Copy link
Contributor

thnkslprpt commented Mar 23, 2023

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
There is an effort in #483 to deprecate/reduce the existence of multiple (non-negative) return codes indicating success.

An easy target to start chipping away at this is CFE_TBL_INFO_TABLE_LOCKED, used in CFE_TBL_UpdateInternal() to signal a locked table and therefore skip the update. Many of the others require refactoring to correct (those in CFE_TBL_Register) or are ambiguous as to whether they should be categorized as error or success.

Code snips

if (LockStatus)
{
Status = CFE_TBL_INFO_TABLE_LOCKED;
CFE_ES_WriteToSysLog("%s: Unable to update locked table Handle=%d\n", __func__, TblHandle);
}

Expected behavior
This is a clear error (as noted by @jphickey in his analysis in #483) - i.e. nothing was updated. Code should be negative indicating failure/error.

Reporter Info
Avi Weiss @thnkslprpt

@thnkslprpt thnkslprpt changed the title Convert CFE_TBL_INFO_TABLE_LOCKED into a negative error code CFE_TBL_INFO_TABLE_LOCKED should be a negative error code Mar 23, 2023
thnkslprpt added a commit to thnkslprpt/cFE that referenced this issue Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants