Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151586337
D50353.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1008 B
Referenced Files
None
Subscribers
None
D50353.diff
View Options
diff --git a/sys/kern/subr_pctrie.c b/sys/kern/subr_pctrie.c
--- a/sys/kern/subr_pctrie.c
+++ b/sys/kern/subr_pctrie.c
@@ -617,16 +617,16 @@
struct pctrie_node **parent_out, smr_t smr, enum pctrie_access access)
{
struct pctrie_node *parent;
+ uint64_t *val;
int base, end, i;
parent = node;
for (i = 0; i < count;) {
node = _pctrie_lookup_node(ptree, parent, index + i, &parent,
smr, access);
- value[i] = pctrie_match_value(node, index + i);
- if (value[i] == NULL)
+ if ((val = pctrie_match_value(node, index + i)) == NULL)
break;
- ++i;
+ value[i++] = val;
base = (index + i) % PCTRIE_COUNT;
if (base == 0 || parent == NULL || parent->pn_clev != 0)
continue;
@@ -634,10 +634,9 @@
while (i < end) {
node = pctrie_node_load(&parent->pn_child[base++],
smr, access);
- value[i] = pctrie_toval(node);
- if (value[i] == NULL)
+ if ((val = pctrie_toval(node)) == NULL)
break;
- ++i;
+ value[i++] = val;
}
if (i < end)
break;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 10, 8:39 AM (4 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31214088
Default Alt Text
D50353.diff (1008 B)
Attached To
Mode
D50353: pctrie_lookup_range: don't write the null
Attached
Detach File
Event Timeline
Log In to Comment