r365966 - [DirectoryWatcher][linux] Fix use of uninitialized value
Jan Korous via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 12 15:11:44 PDT 2019
Author: jkorous
Date: Fri Jul 12 15:11:43 2019
New Revision: 365966
URL: http://llvm.org/viewvc/llvm-project?rev=365966&view=rev
Log:
[DirectoryWatcher][linux] Fix use of uninitialized value
Modified:
cfe/trunk/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp
Modified: cfe/trunk/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp?rev=365966&r1=365965&r2=365966&view=diff
==============================================================================
--- cfe/trunk/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp (original)
+++ cfe/trunk/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp Fri Jul 12 15:11:43 2019
@@ -220,8 +220,8 @@ void DirectoryWatcherLinux::InotifyPolli
// Multiple epoll_events can be received for a single file descriptor per
// epoll_wait call.
- for (const auto &EpollEvent : EpollEventBuffer) {
- if (EpollEvent.data.fd == InotifyPollingStopSignal.FDRead) {
+ for (int i = 0; i < EpollWaitResult; ++i) {
+ if (EpollEventBuffer[i].data.fd == InotifyPollingStopSignal.FDRead) {
StopWork();
return;
}
More information about the cfe-commits
mailing list