commit | 88ffc089bc43d0219225276abaf2d963ba915568 | [log] [tgz] |
---|---|---|
author | Simon Butcher <simon.butcher@arm.com> | Fri May 20 00:00:37 2016 +0100 |
committer | Simon Butcher <simon.butcher@arm.com> | Mon May 23 14:29:32 2016 +0100 |
tree | 6e040c28d6b879c5b58ab0a8535d7a9e1cedb12c | |
parent | 58eddef8b2a3140b6a224ef2332fdc114cbe1ef8 [diff] [blame] |
Adds casts to zeroize functions to allow building as C++
diff --git a/library/cipher.c b/library/cipher.c index ccc0685..0dc5152 100644 --- a/library/cipher.c +++ b/library/cipher.c
@@ -51,7 +51,7 @@ /* Implementation that should never be optimized out by the compiler */ static void mbedtls_zeroize( void *v, size_t n ) { - volatile unsigned char *p = v; while( n-- ) *p++ = 0; + volatile unsigned char *p = (unsigned char*)v; while( n-- ) *p++ = 0; } static int supported_init = 0;