config get and struct naming cleanup

This commit is contained in:
Antonio SJ Musumeci 2015-07-21 14:19:17 -04:00
parent 81dbafdc19
commit f130d07fd8
67 changed files with 471 additions and 467 deletions

View file

@ -43,17 +43,16 @@ _newest(const vector<string> &basepaths,
const string &fusepath,
vector<string> &paths)
{
time_t newest = std::numeric_limits<time_t>::min();
const char *neweststr = NULL;
time_t newest = std::numeric_limits<time_t>::min();
string neweststr;
for(size_t i = 0, ei = basepaths.size(); i != ei; i++)
{
int rv;
struct stat st;
const char *basepath;
string fullpath;
int rv;
struct stat st;
string fullpath;
const string &basepath = basepaths[i];
basepath = basepaths[i].c_str();
fullpath = fs::path::make(basepath,fusepath);
rv = ::lstat(fullpath.c_str(),&st);
@ -64,7 +63,7 @@ _newest(const vector<string> &basepaths,
}
}
if(neweststr == NULL)
if(neweststr.empty())
return (errno=ENOENT,-1);
paths.push_back(neweststr);