aboutsummaryrefslogtreecommitdiffstats
path: root/util/system/env.cpp
diff options
context:
space:
mode:
authorIlnur Khuziev <ilnur.khuziev@yandex.ru>2022-02-10 16:46:14 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:14 +0300
commit60040c91ffe701a84689b2c6310ff845e65cff42 (patch)
tree1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /util/system/env.cpp
parent736dcd8ca259457a136f2f9f9168c44643914323 (diff)
downloadydb-60040c91ffe701a84689b2c6310ff845e65cff42.tar.gz
Restoring authorship annotation for Ilnur Khuziev <ilnur.khuziev@yandex.ru>. Commit 2 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 a3d46e48d3f..ead9b566a5f 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);
}