diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/kmscapture.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/kmscapture.cpp b/tests/kmscapture.cpp index 81650d7..3f1243b 100644 --- a/tests/kmscapture.cpp +++ b/tests/kmscapture.cpp @@ -361,7 +361,8 @@ int main(int argc, char** argv) FAIL_IF(i < nr_cameras, "available plane not found"); - struct pollfd fds[nr_cameras + 1] = { }; + vector<pollfd> fds(nr_cameras + 1); + for (i = 0; i < nr_cameras; i++) { fds[i].fd = cameras[i]->fd(); fds[i].events = POLLIN; @@ -370,7 +371,7 @@ int main(int argc, char** argv) fds[nr_cameras].events = POLLIN; while (true) { - int r = poll(fds, nr_cameras + 1, -1); + int r = poll(fds.data(), nr_cameras + 1, -1); ASSERT(r > 0); if (fds[nr_cameras].revents != 0) |