Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Knot DNS
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
22
Issues
22
List
Boards
Labels
Service Desk
Milestones
Merge Requests
16
Merge Requests
16
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Knot projects
Knot DNS
Commits
1d058c41
Commit
1d058c41
authored
Sep 27, 2016
by
Daniel Salzman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hat-trie: remove hattrie_build_index as qp-trie doesn't need it
parent
8147eafa
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
0 additions
and
50 deletions
+0
-50
src/contrib/hat-trie/hat-trie.h
src/contrib/hat-trie/hat-trie.h
+0
-6
src/knot/dnssec/nsec3-chain.c
src/knot/dnssec/nsec3-chain.c
+0
-3
src/knot/updates/changesets.c
src/knot/updates/changesets.c
+0
-3
src/knot/updates/zone-update.c
src/knot/updates/zone-update.c
+0
-1
src/knot/zone/contents.c
src/knot/zone/contents.c
+0
-3
src/libknot/db/db_trie.c
src/libknot/db/db_trie.c
+0
-6
src/utils/common/lookup.c
src/utils/common/lookup.c
+0
-9
src/utils/common/lookup.h
src/utils/common/lookup.h
+0
-7
src/utils/knotc/interactive.c
src/utils/knotc/interactive.c
+0
-4
tests/contrib/test_hat-trie.c
tests/contrib/test_hat-trie.c
+0
-3
tests/utils/test_lookup.c
tests/utils/test_lookup.c
+0
-2
tests/ztree.c
tests/ztree.c
+0
-3
No files found.
src/contrib/hat-trie/hat-trie.h
View file @
1d058c41
...
...
@@ -45,12 +45,6 @@ inline static size_t hattrie_weight(const hattrie_t *trie)
return
qp_trie_weight
(
trie
);
}
inline
static
void
hattrie_build_index
(
hattrie_t
*
trie
)
{
// not needed
UNUSED
(
trie
);
}
inline
static
int
hattrie_apply_rev
(
hattrie_t
*
trie
,
int
(
*
f
)(
value_t
*
,
void
*
),
void
*
d
)
{
return
qp_trie_apply
(
trie
,
f
,
d
);
...
...
src/knot/dnssec/nsec3-chain.c
View file @
1d058c41
...
...
@@ -469,9 +469,6 @@ static int create_nsec3_nodes(const zone_contents_t *zone,
hattrie_iter_free
(
it
);
/* Rebuild index over nsec3 nodes. */
hattrie_build_index
(
nsec3_nodes
);
return
result
;
}
...
...
src/knot/updates/changesets.c
View file @
1d058c41
...
...
@@ -77,9 +77,6 @@ static int changeset_iter_init(changeset_iter_t *ch_it,
for
(
size_t
i
=
0
;
i
<
tries
;
++
i
)
{
hattrie_t
*
t
=
va_arg
(
args
,
hattrie_t
*
);
if
(
t
)
{
if
(
sorted
)
{
hattrie_build_index
(
t
);
}
hattrie_iter_t
*
it
=
hattrie_iter_begin
(
t
,
sorted
);
if
(
it
==
NULL
)
{
cleanup_iter_list
(
&
ch_it
->
iters
);
...
...
src/knot/updates/zone-update.c
View file @
1d058c41
...
...
@@ -643,7 +643,6 @@ static int iter_init_tree_iters(zone_update_iter_t *it, zone_update_t *update,
/* Begin iteration. We can safely assume _contents is a valid pointer. */
tree
=
nsec3
?
_contents
->
nsec3_nodes
:
_contents
->
nodes
;
hattrie_build_index
(
tree
);
it
->
tree_it
=
hattrie_iter_begin
(
nsec3
?
_contents
->
nsec3_nodes
:
_contents
->
nodes
,
true
);
if
(
it
->
tree_it
==
NULL
)
{
return
KNOT_ENOMEM
;
...
...
src/knot/zone/contents.c
View file @
1d058c41
...
...
@@ -700,7 +700,6 @@ static int recreate_normal_tree(const zone_contents_t *z, zone_contents_t *out)
}
hattrie_iter_free
(
itt
);
hattrie_build_index
(
out
->
nodes
);
return
KNOT_EOK
;
}
...
...
@@ -735,7 +734,6 @@ static int recreate_nsec3_tree(const zone_contents_t *z, zone_contents_t *out)
}
hattrie_iter_free
(
itt
);
hattrie_build_index
(
out
->
nsec3_nodes
);
return
KNOT_EOK
;
}
...
...
@@ -952,7 +950,6 @@ static int adjust_nodes(zone_tree_t *nodes, zone_adjust_arg_t *adjust_arg,
adjust_arg
->
first_node
=
NULL
;
adjust_arg
->
previous_node
=
NULL
;
hattrie_build_index
(
nodes
);
int
ret
=
zone_tree_apply
(
nodes
,
callback
,
adjust_arg
);
if
(
adjust_arg
->
first_node
)
{
...
...
src/libknot/db/db_trie.c
View file @
1d058c41
...
...
@@ -54,12 +54,6 @@ static int txn_begin(knot_db_t *db, knot_db_txn_t *txn, unsigned flags)
static
int
txn_commit
(
knot_db_txn_t
*
txn
)
{
/* Rebuild order index only for WR transactions. */
if
((
size_t
)
txn
->
txn
&
KNOT_DB_RDONLY
)
{
return
KNOT_EOK
;
}
hattrie_build_index
((
hattrie_t
*
)
txn
->
db
);
return
KNOT_EOK
;
}
...
...
src/utils/common/lookup.c
View file @
1d058c41
...
...
@@ -89,15 +89,6 @@ int lookup_insert(lookup_t *lookup, const char *str, void *data)
return
KNOT_EOK
;
}
void
lookup_index
(
lookup_t
*
lookup
)
{
if
(
lookup
==
NULL
)
{
return
;
}
hattrie_build_index
(
lookup
->
trie
);
}
static
int
set_key
(
lookup_t
*
lookup
,
char
**
dst
,
const
char
*
key
,
size_t
key_len
)
{
if
(
*
dst
!=
NULL
)
{
...
...
src/utils/common/lookup.h
View file @
1d058c41
...
...
@@ -82,13 +82,6 @@ void lookup_deinit(lookup_t *lookup);
*/
int
lookup_insert
(
lookup_t
*
lookup
,
const
char
*
str
,
void
*
data
);
/*!
* Indexes the lookup container.
*
* \param[in] lookup Lookup context.
*/
void
lookup_index
(
lookup_t
*
lookup
);
/*!
* Searches the lookup container for the given key.
*
...
...
src/utils/knotc/interactive.c
View file @
1d058c41
...
...
@@ -44,7 +44,6 @@ static void cmds_lookup(EditLine *el, const char *str, size_t str_len)
}
}
lookup_index
(
&
lookup
);
lookup_complete
(
&
lookup
,
str
,
str_len
,
el
,
true
);
cmds_lookup_finish:
...
...
@@ -73,7 +72,6 @@ static void local_zones_lookup(EditLine *el, const char *str, size_t str_len)
}
}
lookup_index
(
&
lookup
);
lookup_complete
(
&
lookup
,
str
,
str_len
,
el
,
true
);
local_zones_lookup_finish:
...
...
@@ -173,7 +171,6 @@ static void id_lookup(EditLine *el, const char *str, size_t str_len,
}
}
lookup_index
(
&
lookup
);
lookup_complete
(
&
lookup
,
str
,
str_len
,
el
,
add_space
);
id_lookup_finish:
...
...
@@ -229,7 +226,6 @@ static void list_lookup(EditLine *el, const char *section, const char *item)
}
}
lookup_index
(
&
lookup
);
lookup_complete
(
&
lookup
,
item
,
strlen
(
item
),
el
,
section
!=
NULL
);
list_lookup_finish:
...
...
tests/contrib/test_hat-trie.c
View file @
1d058c41
...
...
@@ -139,9 +139,6 @@ int main(int argc, char *argv[])
/* Check total insertions against trie weight. */
is_int
(
hattrie_weight
(
trie
),
inserted
,
"hattrie: trie weight matches insertions"
);
/* Build order-index. */
hattrie_build_index
(
trie
);
/* Lookup all keys */
passed
=
true
;
for
(
unsigned
i
=
0
;
i
<
key_count
;
++
i
)
{
...
...
tests/utils/test_lookup.c
View file @
1d058c41
...
...
@@ -63,8 +63,6 @@ static void init(lookup_t *l, const char **table)
ok
(
ret
==
KNOT_EOK
,
"Insert '%s'"
,
*
table
);
table
++
;
}
lookup_index
(
l
);
}
static
void
test_search_basic
(
void
)
...
...
tests/ztree.c
View file @
1d058c41
...
...
@@ -98,9 +98,6 @@ int main(int argc, char *argv[])
}
ok
(
passed
,
"ztree: lookup"
);
/* heal index for ordered lookup */
hattrie_build_index
(
t
);
/* 4. ordered lookup */
node
=
NULL
;
zone_node_t
*
prev
=
NULL
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment