diff options
author | Vlad Yaroslavlev <vladon@vladon.com> | 2022-02-10 16:46:25 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:25 +0300 |
commit | 344ea37b4a345701ab0e67de2266a1c1bd7baf2d (patch) | |
tree | 1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /util/generic/utility.cpp | |
parent | 706b83ed7de5a473436620367af31fc0ceecde07 (diff) | |
download | ydb-344ea37b4a345701ab0e67de2266a1c1bd7baf2d.tar.gz |
Restoring authorship annotation for Vlad Yaroslavlev <vladon@vladon.com>. Commit 2 of 2.
Diffstat (limited to 'util/generic/utility.cpp')
-rw-r--r-- | util/generic/utility.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/util/generic/utility.cpp b/util/generic/utility.cpp index a4173d06ee..e1ed101c76 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 +} |