[DirectoryWatcher][linux] Fix use of uninitialized value

llvm-svn: 365966
This commit is contained in:
Jan Korous 2019-07-12 22:11:43 +00:00
parent d8ddf83950
commit ec2abbafda
1 changed files with 2 additions and 2 deletions

View File

@ -220,8 +220,8 @@ void DirectoryWatcherLinux::InotifyPollingLoop() {
// 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;
}