diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2013-03-22 02:05:42 -0700 |
---|---|---|
committer | Patrick Ohly <patrick.ohly@intel.com> | 2013-04-22 16:01:44 +0200 |
commit | 7a1278dae1d8b4828d2bc2793a51aaa6a1f1cf10 (patch) | |
tree | 4086ae8abca781bef9ebf759a31ed555d7f902c7 | |
parent | 3858d783705b4d7d2f59ce67fa9e5b2908cbaa32 (diff) |
testing: only call getenv() once for each var
Klocwork warned about the second call because it did not recognize that
it cannot return NULL.
-rw-r--r-- | src/client-test-app.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client-test-app.cpp b/src/client-test-app.cpp index 87b27982..0c13e724 100644 --- a/src/client-test-app.cpp +++ b/src/client-test-app.cpp @@ -116,8 +116,8 @@ public: * can be instantiated as client A with id == "1" and client B with id == "2" */ TestEvolution(const string &id) : - ClientTest(getenv("CLIENT_TEST_DELAY") ? atoi(getenv("CLIENT_TEST_DELAY")) : 0, - getenv("CLIENT_TEST_LOG") ? getenv("CLIENT_TEST_LOG") : ""), + ClientTest(atoi(getEnv("CLIENT_TEST_DELAY", "0")), + getEnv("CLIENT_TEST_LOG", "")), m_initialized(false), m_clientID(id), m_configs(SyncSource::getTestRegistry()) |