Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-selector
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-selector
Commits
da885ca1
Commit
da885ca1
authored
Feb 28, 2020
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Speed up prefix matches a bit.
parent
47eae6cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
patricia.c
src/patricia.c
+2
-1
No files found.
src/patricia.c
View file @
da885ca1
...
@@ -275,7 +275,8 @@ pt_search(const struct pt_y * const restrict y,
...
@@ -275,7 +275,8 @@ pt_search(const struct pt_y * const restrict y,
l
=
y
->
off
+
y
->
len
;
l
=
y
->
off
+
y
->
len
;
if
(
l
>
len
)
if
(
l
>
len
)
return
(
0
);
return
(
0
);
if
(
memcmp
(
subject
+
y
->
off
,
strings
[
y
->
idx
]
+
y
->
off
,
y
->
len
)
!=
0
)
if
(
y
->
len
>
0
&&
memcmp
(
subject
+
y
->
off
,
strings
[
y
->
idx
]
+
y
->
off
,
y
->
len
)
!=
0
)
return
(
0
);
return
(
0
);
if
(
strings
[
y
->
idx
][
l
]
==
'\0'
)
{
if
(
strings
[
y
->
idx
][
l
]
==
'\0'
)
{
...
...
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