RTEMS | assert node->previous==NULL in chain_is_node_off_chain() (!871)
Dhruva P V (@Dhrulian)
gitlab at rtems.org
Wed Dec 10 17:14:16 UTC 2025
Dhruva P V created a merge request: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/871
Project:Branches: Dhrulian/rtems:fixing-chain-off to rtems/rtos/rtems:main
Author: Dhruva P V
## Fixing the function "`_Chain_Is_node_off_chain()"`.(#4812)
In the previous code , the function returned true when node-\>next == NULL, but did not verify that node-\>previous was also NULL.
in the updated code the code implements:
* Return `true` when `node->next == NULL`, as before, and assert that `node->previous == NULL` using `_Assert()`.
* If node-\>next != NULL, the function returns false indicating that the node is on a chain.
The changes address the issue #4812
<!--Default settings, if it is a dropdown it will set after submission-->
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/871
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20251210/61cdf1ae/attachment-0001.htm>
More information about the bugs
mailing list