diff options
author | Arslan Urtashev <urtashev@gmail.com> | 2022-02-10 16:48:55 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:48:55 +0300 |
commit | b97740540e7302cec9efa181e106ae1990a0cc1c (patch) | |
tree | 1a2a0bfe523c3272d207e2d75254a41d3945a3bb /util/system | |
parent | 31789673dc3562bc7540e00fe031ba84ae282c24 (diff) | |
download | ydb-b97740540e7302cec9efa181e106ae1990a0cc1c.tar.gz |
Restoring authorship annotation for Arslan Urtashev <urtashev@gmail.com>. Commit 1 of 2.
Diffstat (limited to 'util/system')
-rw-r--r-- | util/system/env.cpp | 6 | ||||
-rw-r--r-- | util/system/env.h | 4 | ||||
-rw-r--r-- | util/system/env_ut.cpp | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/util/system/env.cpp b/util/system/env.cpp index ead9b566a5..19d570532a 100644 --- a/util/system/env.cpp +++ b/util/system/env.cpp @@ -26,9 +26,9 @@ TString GetEnv(const TString& key, const TString& def) { size_t len = GetEnvironmentVariableA(key.data(), nullptr, 0); if (len == 0) { - if (GetLastError() == ERROR_ENVVAR_NOT_FOUND) { - return def; - } + if (GetLastError() == ERROR_ENVVAR_NOT_FOUND) { + return def; + } return TString{}; } diff --git a/util/system/env.h b/util/system/env.h index e2ccdd1e95..b8a3154710 100644 --- a/util/system/env.h +++ b/util/system/env.h @@ -5,8 +5,8 @@ /** * Search the environment list provided by the host environment for associated variable. * - * @param key String identifying the name of the environmental variable to look for - * @param def String that returns if environmental variable not found by key + * @param key String identifying the name of the environmental variable to look for + * @param def String that returns if environmental variable not found by key * * @return String that is associated with the matched environment variable or empty string if * such variable is missing. diff --git a/util/system/env_ut.cpp b/util/system/env_ut.cpp index e03cc01658..5b34b3ea64 100644 --- a/util/system/env_ut.cpp +++ b/util/system/env_ut.cpp @@ -10,11 +10,11 @@ Y_UNIT_TEST_SUITE(EnvTest) { TString def = "Some default value for env var"; // first of all, it should be clear UNIT_ASSERT_VALUES_EQUAL(GetEnv(key), TString()); - UNIT_ASSERT_VALUES_EQUAL(GetEnv(key, def), def); + UNIT_ASSERT_VALUES_EQUAL(GetEnv(key, def), def); SetEnv(key, value); // set and see what value we get here UNIT_ASSERT_VALUES_EQUAL(GetEnv(key), value); - UNIT_ASSERT_VALUES_EQUAL(GetEnv(key, def), value); + UNIT_ASSERT_VALUES_EQUAL(GetEnv(key, def), value); // set empty value SetEnv(key, TString()); UNIT_ASSERT_VALUES_EQUAL(GetEnv(key), TString()); |