summaryrefslogtreecommitdiff
path: root/src/generic/util/temp.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/generic/util/temp.cc')
-rw-r--r--src/generic/util/temp.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/generic/util/temp.cc b/src/generic/util/temp.cc
index a29bb1f7..73c1587f 100644
--- a/src/generic/util/temp.cc
+++ b/src/generic/util/temp.cc
@@ -170,10 +170,10 @@ namespace temp
const char *tmpdir = getenv("TMPDIR");
- if(tmpdir == NULL)
+ if(strempty(tmpdir) == true)
tmpdir = getenv("TMP");
- if(tmpdir == NULL)
+ if(strempty(tmpdir) == true)
tmpdir = "/tmp";
// User name and process information is encoded into the temporary
@@ -199,7 +199,7 @@ namespace temp
std::string err = sstrerror(errnum);
LOG_ERROR(Loggers::getAptitudeTemp(),
boost::format(_("Unable to create temporary directory from template \"%s\": %s"))
- % tmpl % err);
+ % tmpl.get() % err);
return;
}