tests: Move to kernel style SPDX license identifiers
[lttng-tools.git] / tests / regression / kernel / select_poll_epoll.c
index 08e7fce0d898df547da42e371dc694f90bea4141..33b8cb5d5d100d29ac18777ba68ae996e1ced057 100644 (file)
@@ -1,3 +1,10 @@
+/*
+ * Copyright (C) 2016 Julien Desfossez <jdesfossez@efficios.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0-only
+ *
+ */
+
 #include <stdio.h>
 #include <poll.h>
 #include <signal.h>
@@ -31,7 +38,7 @@
 #define MSEC_PER_NSEC (MSEC_PER_USEC * 1000)
 
 static int timeout; /* seconds, -1 to disable */
-volatile static int stop_thread;
+static volatile int stop_thread;
 static int wait_fd;
 
 struct ppoll_thread_data {
@@ -732,6 +739,9 @@ void epoll_pwait_concurrent_munmap(void)
        struct epoll_event *epoll_event;
        pthread_t writer;
 
+       for (i = 0; i < MAX_FDS; i++) {
+               fds[i] = -1;
+       }
        epollfd = epoll_create(MAX_FDS);
        if (epollfd < 0) {
                perror("[eppoll] create");
This page took 0.02363 seconds and 4 git commands to generate.