aboutsummaryrefslogtreecommitdiffstats
path: root/util/system/env.cpp
diff options
context:
space:
mode:
authorIlnur Khuziev <ilnur.khuziev@yandex.ru>2022-02-10 16:46:13 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:13 +0300
commit736dcd8ca259457a136f2f9f9168c44643914323 (patch)
treeddd46a036d68bfa83aa11b892f31243ea6b068a1 /util/system/env.cpp
parent9bf2fa2b060c9881d3135c2208c624a1dd546ecc (diff)
downloadydb-736dcd8ca259457a136f2f9f9168c44643914323.tar.gz
Restoring authorship annotation for Ilnur Khuziev <ilnur.khuziev@yandex.ru>. Commit 1 of 2.
Diffstat (limited to 'util/system/env.cpp')
-rw-r--r--util/system/env.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/util/system/env.cpp b/util/system/env.cpp
index ead9b566a5..a3d46e48d3 100644
--- a/util/system/env.cpp
+++ b/util/system/env.cpp
@@ -50,18 +50,18 @@ TString GetEnv(const TString& key, const TString& def) {
}
void SetEnv(const TString& key, const TString& value) {
- bool isOk = false;
- int errorCode = 0;
+ bool isOk = false;
+ int errorCode = 0;
#ifdef _win_
isOk = SetEnvironmentVariable(key.data(), value.data());
- if (!isOk) {
- errorCode = GetLastError();
- }
+ if (!isOk) {
+ errorCode = GetLastError();
+ }
#else
isOk = (0 == setenv(key.data(), value.data(), true /*replace*/));
- if (!isOk) {
- errorCode = errno;
- }
+ if (!isOk) {
+ errorCode = errno;
+ }
#endif
- Y_ENSURE_EX(isOk, TSystemError() << "failed to SetEnv with error-code " << errorCode);
+ Y_ENSURE_EX(isOk, TSystemError() << "failed to SetEnv with error-code " << errorCode);
}