diff options
Diffstat (limited to 'board/cr50/dcrypto/util.c')
-rw-r--r-- | board/cr50/dcrypto/util.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/board/cr50/dcrypto/util.c b/board/cr50/dcrypto/util.c index 08167bd9c5..117fec60b4 100644 --- a/board/cr50/dcrypto/util.c +++ b/board/cr50/dcrypto/util.c @@ -203,3 +203,15 @@ __stdlib_compat int strncmp(const char *s1, const char *s2, size_t n) } return 0; } + +static void always_memset_impl(volatile char *s, int c, size_t n) +{ + while (n--) + *s++ = c; +} + +void *always_memset(void *s, int c, size_t n) +{ + always_memset_impl(s, c, n); + return s; +} |