Return the memory address where the 'parent' node stores the specified * 'child' pointer, so that the caller can update the pointer with another * one if needed. The function assumes it will find a match, otherwise the * operation is an undefined behavior (it will continue scanning the * memory without any bound checking). */
| 1122 | * operation is an undefined behavior (it will continue scanning the |
| 1123 | * memory without any bound checking). */ |
| 1124 | raxNode **raxFindParentLink(raxNode *parent, raxNode *child) { |
| 1125 | raxNode **cp = raxNodeFirstChildPtr(parent); |
| 1126 | raxNode *c; |
| 1127 | while(1) { |
| 1128 | memcpy(&c,cp,sizeof(c)); |
| 1129 | if (c == child) break; |
| 1130 | cp++; |
| 1131 | } |
| 1132 | return cp; |
| 1133 | } |
| 1134 | |
| 1135 | /* Low level child removal from node. 'childptr' must point to the child |
| 1136 | * pointer stored inside the parent node, and is used directly instead of |
no outgoing calls
no test coverage detected