aboutsummaryrefslogtreecommitdiffstats
path: root/util/system/error.cpp
diff options
context:
space:
mode:
authoraosipenko <aosipenko@yandex-team.ru>2022-02-10 16:48:08 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:48:08 +0300
commit948fd24d47d4b3b7815aaef1686aea00ef3f4288 (patch)
tree8ad4c39c2a5f8b341bc02e3b0c5e8f26c40373cb /util/system/error.cpp
parentd2eb4aae699fa2f6901bf32d22eec019c8f29838 (diff)
downloadydb-948fd24d47d4b3b7815aaef1686aea00ef3f4288.tar.gz
Restoring authorship annotation for <aosipenko@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/system/error.cpp')
-rw-r--r--util/system/error.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/util/system/error.cpp b/util/system/error.cpp
index f778ec42cb..a33c09badf 100644
--- a/util/system/error.cpp
+++ b/util/system/error.cpp
@@ -67,22 +67,22 @@ const char* LastSystemErrorText(int code) {
#endif
}
-#ifdef _win_
-static char* Strip(char* s) {
- size_t len = strlen(s);
- const char* ptr = s;
- Strip(ptr, len);
- if (ptr != s)
- memmove(s, ptr, len);
- s[len] = 0;
- return s;
-}
-#endif // _win_
-
+#ifdef _win_
+static char* Strip(char* s) {
+ size_t len = strlen(s);
+ const char* ptr = s;
+ Strip(ptr, len);
+ if (ptr != s)
+ memmove(s, ptr, len);
+ s[len] = 0;
+ return s;
+}
+#endif // _win_
+
void LastSystemErrorText(char* str, size_t size, int code) {
#if defined(_win_)
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, 0, code, 0, str, DWORD(size), 0);
- Strip(str);
+ Strip(str);
#elif defined(_sun_)
strfcpy(str, strerror(code), size);
#elif defined(_freebsd_) || defined(_darwin_) || defined(_musl_) || defined(_bionic_)