Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nghttp2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
Libraries
nghttp2
Commits
3fde4c76
Commit
3fde4c76
authored
Dec 05, 2013
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttp2_map: Code cleanup
parent
a3c888d7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
lib/nghttp2_map.c
lib/nghttp2_map.c
+2
-3
No files found.
lib/nghttp2_map.c
View file @
3fde4c76
...
@@ -28,8 +28,6 @@
...
@@ -28,8 +28,6 @@
#define INITIAL_TABLE_LENGTH 16
#define INITIAL_TABLE_LENGTH 16
#define LOAD_FACTOR 75
int
nghttp2_map_init
(
nghttp2_map
*
map
)
int
nghttp2_map_init
(
nghttp2_map
*
map
)
{
{
map
->
tablelen
=
INITIAL_TABLE_LENGTH
;
map
->
tablelen
=
INITIAL_TABLE_LENGTH
;
...
@@ -144,7 +142,8 @@ static int resize(nghttp2_map *map, size_t new_tablelen)
...
@@ -144,7 +142,8 @@ static int resize(nghttp2_map *map, size_t new_tablelen)
int
nghttp2_map_insert
(
nghttp2_map
*
map
,
nghttp2_map_entry
*
new_entry
)
int
nghttp2_map_insert
(
nghttp2_map
*
map
,
nghttp2_map_entry
*
new_entry
)
{
{
int
rv
;
int
rv
;
if
(
100
*
(
map
->
size
+
1
)
>
map
->
tablelen
*
LOAD_FACTOR
)
{
/* Load factor is 0.75 */
if
((
map
->
size
+
1
)
*
4
>
map
->
tablelen
*
3
)
{
rv
=
resize
(
map
,
map
->
tablelen
*
2
);
rv
=
resize
(
map
,
map
->
tablelen
*
2
);
if
(
rv
!=
0
)
{
if
(
rv
!=
0
)
{
return
rv
;
return
rv
;
...
...
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