mdbx-test: fix minor Coverity warnings.

Change-Id: I53ab4ee10317b4530db727ed0b431e5de9887b74
This commit is contained in:
Leonid Yuriev
2020-05-01 00:22:51 +03:00
parent b943466727
commit 07174cbfdf
2 changed files with 11 additions and 10 deletions

View File

@@ -517,9 +517,9 @@ std::string osal_tempdir(void) {
tempdir = getenv("TEMPDIR");
if (!tempdir)
tempdir = getenv("TEMP");
if (tempdir) {
if (tempdir && *tempdir) {
std::string dir(tempdir);
if (!dir.empty() && dir.at(dir.length() - 1) != '/')
if (dir.back() != '/')
dir.append("/");
return dir;
}