Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-blobdigest
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
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-blobdigest
Commits
85b841f9
Commit
85b841f9
authored
Jan 24, 2019
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify
parent
0ba09bfd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
vmod_blobdigest.c
src/vmod_blobdigest.c
+8
-10
No files found.
src/vmod_blobdigest.c
View file @
85b841f9
...
...
@@ -260,22 +260,20 @@ ws_alloc_digest(VRT_CTX, const size_t digestsz, void **digestp,
const
char
*
const
restrict
context
,
const
char
*
const
restrict
caller
)
{
unsigned
char
*
spc
;
struct
vrt_blob
*
b
;
uintptr_t
snap
;
CHECK_OBJ_NOTNULL
(
ctx
->
ws
,
WS_MAGIC
);
AN
(
digestp
);
snap
=
WS_Snapshot
(
ctx
->
ws
);
if
((
b
=
WS_Alloc
(
ctx
->
ws
,
sizeof
*
b
))
==
NULL
)
{
VERRNOMEM
(
ctx
,
"allocating blob in %s.%s()"
,
context
,
caller
);
return
(
NULL
);
}
if
((
b
->
blob
=
*
digestp
=
WS_Alloc
(
ctx
->
ws
,
digestsz
))
==
NULL
)
{
WS_Reset
(
ctx
->
ws
,
snap
);
VERRNOMEM
(
ctx
,
"allocating hash result in %s.%s()"
,
context
,
caller
);
spc
=
WS_Alloc
(
ctx
->
ws
,
PRNDUP
(
digestsz
)
+
sizeof
*
b
);
if
(
spc
==
NULL
)
{
VERRNOMEM
(
ctx
,
"WS_Alloc in %s.%s()"
,
context
,
caller
);
return
(
NULL
);
}
b
=
(
void
*
)(
spc
+
PRNDUP
(
digestsz
));
b
->
blob
=
*
digestp
=
spc
;
b
->
type
=
BLOB_BLOBDIGEST_DIGEST_TYPE
;
b
->
len
=
digestsz
;
...
...
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