diff options
author | lloyd <[email protected]> | 2012-02-20 21:21:43 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2012-02-20 21:21:43 +0000 |
commit | 04148ffdcb98a527a4d521772fce4416b2010075 (patch) | |
tree | 5652cf5b40583ab7a8f9ece35e4562c42c8bed11 /src/entropy/proc_walk | |
parent | c00027b8114f49d7855d1a79b99048297dc50e34 (diff) |
Merge fixups
Diffstat (limited to 'src/entropy/proc_walk')
-rw-r--r-- | src/entropy/proc_walk/es_ftw.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/entropy/proc_walk/es_ftw.cpp b/src/entropy/proc_walk/es_ftw.cpp index 8b4408aee..407034891 100644 --- a/src/entropy/proc_walk/es_ftw.cpp +++ b/src/entropy/proc_walk/es_ftw.cpp @@ -71,10 +71,8 @@ std::pair<struct dirent*, std::string> Directory_Walker::get_next_dirent() { while(m_cur_dir.first) { - struct dirent* dir = ::readdir(m_cur_dir.first); - - if(dir) - return std::make_pair<struct dirent*, std::string>(dir, m_cur_dir.second); + if(struct dirent* dir = ::readdir(m_cur_dir.first)) + return std::make_pair(dir, m_cur_dir.second); ::closedir(m_cur_dir.first); m_cur_dir = std::make_pair<DIR*, std::string>(0, ""); |