aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic/utility.cpp
diff options
context:
space:
mode:
authorVlad Yaroslavlev <vladon@vladon.com>2022-02-10 16:46:23 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:23 +0300
commit706b83ed7de5a473436620367af31fc0ceecde07 (patch)
tree103305d30dec77e8f6367753367f59b3cd68f9f1 /util/generic/utility.cpp
parent918e8a1574070d0ec733f0b76cfad8f8892ad2e5 (diff)
downloadydb-706b83ed7de5a473436620367af31fc0ceecde07.tar.gz
Restoring authorship annotation for Vlad Yaroslavlev <vladon@vladon.com>. Commit 1 of 2.
Diffstat (limited to 'util/generic/utility.cpp')
-rw-r--r--util/generic/utility.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/util/generic/utility.cpp b/util/generic/utility.cpp
index e1ed101c76..a4173d06ee 100644
--- a/util/generic/utility.cpp
+++ b/util/generic/utility.cpp
@@ -1,21 +1,21 @@
#include "utility.h"
-
-#ifdef _MSC_VER
+
+#ifdef _MSC_VER
#include <Windows.h>
-#endif
-
-void SecureZero(void* pointer, size_t count) noexcept {
-#ifdef _MSC_VER
- SecureZeroMemory(pointer, count);
-#elif defined(memset_s)
- memset_s(pointer, count, 0, count);
-#else
+#endif
+
+void SecureZero(void* pointer, size_t count) noexcept {
+#ifdef _MSC_VER
+ SecureZeroMemory(pointer, count);
+#elif defined(memset_s)
+ memset_s(pointer, count, 0, count);
+#else
volatile char* vPointer = (volatile char*)pointer;
-
- while (count) {
- *vPointer = 0;
- vPointer++;
- count--;
- }
-#endif
-}
+
+ while (count) {
+ *vPointer = 0;
+ vPointer++;
+ count--;
+ }
+#endif
+}