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

@ -42,17 +42,15 @@ _ffwp(const vector<string> &basepaths,
const string &fusepath,
vector<string> &paths)
{
const char *fallback;
string fallback;
fallback = NULL;
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);
@ -67,7 +65,7 @@ _ffwp(const vector<string> &basepaths,
}
}
if(fallback == NULL)
if(fallback.empty())
return (errno=ENOENT,-1);
paths.push_back(fallback);