Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
6f1229be
Commit
6f1229be
authored
Jun 25, 2012
by
Pieter Hintjens
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #389 from hurtonm/master
Fix a bug in trie implementation
parents
c251d940
f8293df4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
mtrie.cpp
src/mtrie.cpp
+8
-2
No files found.
src/mtrie.cpp
View file @
6f1229be
...
...
@@ -235,8 +235,14 @@ void zmq::mtrie_t::rm_helper (pipe_t *pipe_, unsigned char **buff_,
zmq_assert
(
count
>
1
);
// Free the node table if it's no longer used.
if
(
live_nodes
==
0
)
{
free
(
next
.
table
);
next
.
table
=
NULL
;
count
=
0
;
}
// Compact the node table if possible
if
(
live_nodes
==
1
)
{
else
if
(
live_nodes
==
1
)
{
// If there's only one live node in the table we can
// switch to using the more compact single-node
// representation
...
...
@@ -249,7 +255,7 @@ void zmq::mtrie_t::rm_helper (pipe_t *pipe_, unsigned char **buff_,
count
=
1
;
min
=
new_min
;
}
else
if
(
live_nodes
>
1
&&
(
new_min
>
min
||
new_max
<
min
+
count
-
1
)
)
{
else
if
(
new_min
>
min
||
new_max
<
min
+
count
-
1
)
{
zmq_assert
(
new_max
-
new_min
+
1
>
1
);
mtrie_t
**
old_table
=
next
.
table
;
...
...
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