summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Korous <jkorous@apple.com>2019-07-12 22:11:43 +0000
committerJan Korous <jkorous@apple.com>2019-07-12 22:11:43 +0000
commitec2abbafda627963e600c890ddf06ec3b7a1b399 (patch)
treed5227332fde17a7fe1ee5bbf7979b2f537f46485
parentd8ddf839505a1aeb8a7b1b3cdeea8a5cad3b1db0 (diff)
downloadbcm5719-llvm-ec2abbafda627963e600c890ddf06ec3b7a1b399.tar.gz
bcm5719-llvm-ec2abbafda627963e600c890ddf06ec3b7a1b399.zip
[DirectoryWatcher][linux] Fix use of uninitialized value
llvm-svn: 365966
-rw-r--r--clang/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp b/clang/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp
index 986ebc5d95f..87d133f46d8 100644
--- a/clang/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp
+++ b/clang/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp
@@ -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;
}
OpenPOWER on IntegriCloud