diff --git a/native/src/seal/util/common.cpp b/native/src/seal/util/common.cpp index 30cc1657c..1a6b1779b 100644 --- a/native/src/seal/util/common.cpp +++ b/native/src/seal/util/common.cpp @@ -18,7 +18,7 @@ namespace seal { namespace util { - void seal_memzero(void *const data, const size_t size) + void seal_memzero(void *const data, size_t size) { #if SEAL_SYSTEM == SEAL_SYSTEM_WINDOWS SecureZeroMemory(data, size); @@ -33,8 +33,7 @@ namespace seal explicit_memset(data, 0, size); #else volatile SEAL_BYTE *data_ptr = reinterpret_cast(data); - size_t i = size; - while (i--) + while (size--) { *data_ptr++ = static_cast(0); }