Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F174458357
D51059.id157648.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D51059.id157648.diff
View Options
Index: sys/sys/pctrie.h
===================================================================
--- sys/sys/pctrie.h
+++ sys/sys/pctrie.h
@@ -130,7 +130,7 @@
\
static __inline __unused int \
name##_PCTRIE_INSERT_BASE(struct pctrie *ptree, uint64_t *val, \
- struct pctrie_node *parent, void *parentp, \
+ struct pctrie_node **parent, void *parentp, \
uint64_t *found, struct type **found_out) \
{ \
struct pctrie_node *child; \
@@ -146,7 +146,8 @@
*found_out = NULL; \
return (ENOMEM); \
} \
- pctrie_insert_node(val, parent, parentp, child); \
+ pctrie_insert_node(val, *parent, parentp, child); \
+ *parent = child; \
} \
return (0); \
} \
@@ -159,7 +160,7 @@
uint64_t *val = name##_PCTRIE_PTR2VAL(ptr); \
\
parentp = pctrie_insert_lookup_strict(ptree, val, &parent); \
- return (name##_PCTRIE_INSERT_BASE(ptree, val, parent, parentp, \
+ return (name##_PCTRIE_INSERT_BASE(ptree, val, &parent, parentp, \
NULL, NULL)); \
} \
\
@@ -173,7 +174,7 @@
uint64_t *found; \
\
parentp = pctrie_insert_lookup(ptree, val, &parent, &found); \
- return (name##_PCTRIE_INSERT_BASE(ptree, val, parent, parentp, \
+ return (name##_PCTRIE_INSERT_BASE(ptree, val, &parent, parentp, \
found, found_out_opt)); \
} \
\
@@ -188,7 +189,7 @@
int retval; \
\
parentp = pctrie_insert_lookup(ptree, val, &parent, &found); \
- retval = name##_PCTRIE_INSERT_BASE(ptree, val, parent, parentp, \
+ retval = name##_PCTRIE_INSERT_BASE(ptree, val, &parent, parentp, \
found, found_out); \
if (retval != 0) \
return (retval); \
@@ -204,7 +205,7 @@
uint64_t *val = name##_PCTRIE_PTR2VAL(ptr); \
\
parentp = pctrie_iter_insert_lookup(it, val); \
- return (name##_PCTRIE_INSERT_BASE(it->ptree, val, it->node, \
+ return (name##_PCTRIE_INSERT_BASE(it->ptree, val, &it->node, \
parentp, NULL, NULL)); \
} \
\
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Oct 4, 10:05 AM (2 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40183230
Default Alt Text
D51059.id157648.diff (2 KB)
Attached To
Mode
D51059: pctrie: correct iter node after node allocation
Attached
Detach File
Event Timeline
Log In to Comment