repo.or.cz
/
libtommath.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Merge pull request #578 from PX4/fix_mp_prime_strong_lucas_lefridge_compilation
[libtommath.git]
/
s_mp_zero_buf.c
blob
23a458dcdfdddb8fe9a3878a4cedbfdbf7ddb0b6
1
#include
"tommath_private.h"
2
#ifdef S_MP_ZERO_BUF_C
3
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
4
/* SPDX-License-Identifier: Unlicense */
5
6
#ifdef MP_USE_MEMOPS
7
# include <string.h>
8
#endif
9
10
void
s_mp_zero_buf
(
void
*
mem
,
size_t
size
)
11
{
12
#ifdef MP_USE_MEMOPS
13
memset
(
mem
,
0
,
size
);
14
#else
15
char
*
m
= (
char
*)
mem
;
16
while
(
size
-- >
0u
) {
17
*
m
++ =
'\0'
;
18
}
19
#endif
20
}
21
22
#endif