From 16b76c50d34a6c73e9ea5b344eb4610aaf97d8d9 Mon Sep 17 00:00:00 2001 From: Nick Angelou Date: Fri, 28 Aug 2020 13:22:37 -0500 Subject: [PATCH] fix: use non-const argument --- native/src/seal/util/common.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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); }