summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael West <michael.west@ettus.com>2013-10-28 13:02:29 -0700
committerMichael West <michael.west@ettus.com>2013-10-28 13:02:29 -0700
commitb4b970c59affbd2114c38638e86ed5f9b235cff7 (patch)
tree7299ffdcb03fde9c3b571b34946a4f08a967f1b6
parent1e4ed1f6d66af9b5ed226135266852c1f329de99 (diff)
downloaduhd-b4b970c59affbd2114c38638e86ed5f9b235cff7.tar.gz
uhd-b4b970c59affbd2114c38638e86ed5f9b235cff7.tar.bz2
uhd-b4b970c59affbd2114c38638e86ed5f9b235cff7.zip
CID 1104347: Fixed logically dead code.
CID 1104336: Fixed array comparison to 0.
-rw-r--r--host/lib/utils/paths.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/host/lib/utils/paths.cpp b/host/lib/utils/paths.cpp
index 53055314b..f9d8b613c 100644
--- a/host/lib/utils/paths.cpp
+++ b/host/lib/utils/paths.cpp
@@ -113,8 +113,8 @@ std::string uhd::get_tmp_path(void){
//try the stdio define if available
#ifdef P_tmpdir
- if (P_tmpdir != NULL) return P_tmpdir;
- #endif
+ return P_tmpdir;
+ #else
//try unix environment variables
tmp_path = std::getenv("TMPDIR");
@@ -122,6 +122,7 @@ std::string uhd::get_tmp_path(void){
//give up and use the unix default
return "/tmp";
+ #endif
}
std::string uhd::get_app_path(void){