Use const_cast instead of reinterpret_cast

pull/757/head
Jeffrey Walton 2018-12-04 22:12:07 -05:00
parent 7832ae3733
commit 4b295f1f32
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
1 changed files with 1 additions and 1 deletions

2
misc.h
View File

@ -1294,7 +1294,7 @@ template<> inline void SecureWipeBuffer(word64 *buf, size_t n)
# ifdef __GNUC__
asm volatile("rep stosq" : "+c"(n), "+D"(p) : "a"(0) : "memory");
# else
__stosq(reinterpret_cast<word64 *>(reinterpret_cast<size_t>(p)), 0, n);
__stosq(const_cast<word64 *>(p), 0, n);
# endif
#else
SecureWipeBuffer(reinterpret_cast<word32 *>(buf), 2*n);