Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
2aa70ca5
Commit
2aa70ca5
authored
Aug 15, 2022
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Eliminate an unwarranted microoptimization.
parent
def50e60
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
16 deletions
+9
-16
cache_esi_deliver.c
bin/varnishd/cache/cache_esi_deliver.c
+9
-16
No files found.
bin/varnishd/cache/cache_esi_deliver.c
View file @
2aa70ca5
...
...
@@ -523,7 +523,7 @@ static int v_matchproto_(vdp_bytes_f)
ved_pretend_gzip_bytes
(
struct
vdp_ctx
*
vdx
,
enum
vdp_action
act
,
void
**
priv
,
const
void
*
pv
,
ssize_t
l
)
{
uint8_t
buf
1
[
5
],
buf2
[
5
];
uint8_t
buf
[
5
];
const
uint8_t
*
p
;
uint16_t
lx
;
struct
ecx
*
ecx
;
...
...
@@ -541,24 +541,17 @@ ved_pretend_gzip_bytes(struct vdp_ctx *vdx, enum vdp_action act, void **priv,
ecx
->
crc
=
crc32
(
ecx
->
crc
,
p
,
l
);
ecx
->
l_crc
+=
l
;
lx
=
65535
;
buf1
[
0
]
=
0
;
vle16enc
(
buf1
+
1
,
lx
);
vle16enc
(
buf1
+
3
,
~
lx
);
while
(
l
>
0
)
{
if
(
l
>=
65535
)
{
if
(
l
>=
65535
)
lx
=
65535
;
if
(
ved_bytes
(
ecx
,
VDP_NULL
,
buf1
,
sizeof
buf1
))
return
(
-
1
);
}
else
{
else
lx
=
(
uint16_t
)
l
;
lx
=
(
uint16_t
)
l
;
buf2
[
0
]
=
0
;
vle16enc
(
buf2
+
1
,
lx
);
vle16enc
(
buf2
+
3
,
~
lx
);
if
(
ved_bytes
(
ecx
,
VDP_NULL
,
buf2
,
sizeof
buf2
))
buf
[
0
]
=
0
;
vle16enc
(
buf
+
1
,
lx
);
vle16enc
(
buf
+
3
,
~
lx
);
if
(
ved_bytes
(
ecx
,
VDP_NULL
,
buf
,
sizeof
buf
))
return
(
-
1
);
}
if
(
ved_bytes
(
ecx
,
VDP_NULL
,
p
,
lx
))
return
(
-
1
);
l
-=
lx
;
...
...
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