summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFumitoshi Ukai <ukai@google.com>2015-12-17 06:36:40 (GMT)
committerFumitoshi Ukai <ukai@google.com>2015-12-17 06:36:40 (GMT)
commit1256d28554ec32351ca8cceb1bfd7dbe9dfc055d (patch)
tree3dc4dcd2ef0bee7dfc5af53a4b7641f22924e85a /src
parent03123011437bd8754a7c5525971eebdb9c2968db (diff)
downloadglog-1256d28554ec32351ca8cceb1bfd7dbe9dfc055d.zip
glog-1256d28554ec32351ca8cceb1bfd7dbe9dfc055d.tar.gz
glog-1256d28554ec32351ca8cceb1bfd7dbe9dfc055d.tar.bz2
win: FAILED macro can't be used with HANDLE.
FAILED macro is for HRESULT, not for HANDLE. FindFirstFile returns INVALID_HANDLE_VALUE when error or not found. https://msdn.microsoft.com/library/windows/desktop/aa364418(v=vs.85).aspx fixes #79
Diffstat (limited to 'src')
-rw-r--r--src/logging_unittest.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/logging_unittest.cc b/src/logging_unittest.cc
index e0e3676..b886222 100644
--- a/src/logging_unittest.cc
+++ b/src/logging_unittest.cc
@@ -628,7 +628,7 @@ static void GetFiles(const string& pattern, vector<string>* files) {
LOG(FATAL) << "No directory separator.";
}
const string dirname = pattern.substr(0, index + 1);
- if (FAILED(handle)) {
+ if (handle == INVALID_HANDLE_VALUE) {
// Finding no files is OK.
return;
}