Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-ece
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
libvmod-ece
Commits
5cad086d
Commit
5cad086d
authored
Sep 13, 2019
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
For key searches, we don't have to special-case for idlen == 0.
memcmp() is defined to return 0 when the length param is 0.
parent
2c41b773
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
7 deletions
+3
-7
keys.c
src/keys.c
+3
-7
No files found.
src/keys.c
View file @
5cad086d
...
...
@@ -318,13 +318,9 @@ key_find(struct key_tree *tree_h, uint8_t *id, uint8_t idlen)
AN
(
tree_h
);
if
(
VRBT_EMPTY
(
tree_h
))
return
NULL
;
if
(
idlen
!=
0
)
{
keycmp
.
id
=
id
;
keycmp
.
idlen
=
idlen
;
key
=
VRBT_FIND
(
key_tree
,
tree_h
,
&
keycmp
);
}
else
key
=
VRBT_MIN
(
key_tree
,
tree_h
);
keycmp
.
id
=
id
;
keycmp
.
idlen
=
idlen
;
key
=
VRBT_FIND
(
key_tree
,
tree_h
,
&
keycmp
);
CHECK_OBJ_ORNULL
(
key
,
KEY_MAGIC
);
return
(
key
);
}
...
...
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