mirror of
https://github.com/AuxXxilium/kmod.git
synced 2025-01-22 23:00:03 +07:00
index: mmap: read child node
This commit is contained in:
parent
77bf936a89
commit
91298dc79e
@ -706,3 +706,14 @@ static struct index_mm_node *index_mm_readroot(struct index_mm *idx)
|
||||
{
|
||||
return index_mm_read_node(idx, idx->root_offset);
|
||||
}
|
||||
|
||||
static struct index_mm_node *index_mm_readchild(const struct index_mm_node *parent,
|
||||
int ch)
|
||||
{
|
||||
if (parent->first <= ch && ch <= parent->last) {
|
||||
return index_mm_read_node(parent->idx,
|
||||
parent->children[ch - parent->first]);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user