Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-gcrypt
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-gcrypt
Commits
c1eb677e
Commit
c1eb677e
authored
May 25, 2017
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Micro-tweaking wipe().
parent
61abf67e
Pipeline
#231
skipped
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
8 deletions
+5
-8
vmod_gcrypt.c
src/vmod_gcrypt.c
+5
-8
No files found.
src/vmod_gcrypt.c
View file @
c1eb677e
...
...
@@ -752,23 +752,20 @@ wipe(void * const dst, size_t len, uint8_t val)
volatile
uint8_t
*
p
=
(
volatile
uint8_t
*
)
dst
;
while
(((
uintptr_t
)
p
&
(
sizeof
(
uint64_t
)
-
1
))
&&
len
)
{
*
p
=
val
;
p
++
;
*
p
++
=
val
;
len
--
;
}
if
(
len
>=
sizeof
(
uint64_t
))
{
volatile
uint64_t
*
p64
;
volatile
uint64_t
*
p64
=
(
volatile
void
*
)
p
;
uint64_t
val64
=
(
uint64_t
)
0x0101010101010101
*
val
;
do
{
p64
=
(
volatile
void
*
)
p
;
*
p64
=
val64
;
p
+=
sizeof
(
uint64_t
);
*
p64
++
=
val64
;
len
-=
sizeof
(
uint64_t
);
}
while
(
len
>=
sizeof
(
uint64_t
));
p
=
(
volatile
void
*
)
p64
;
}
while
(
len
)
{
*
p
=
val
;
p
++
;
*
p
++
=
val
;
len
--
;
}
}
...
...
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