]> xenbits.xensource.com Git - people/iwj/ring3-xl-test.git/commitdiff
It is not necessary to initialize the pollfds array
authorEuan Harris <euan.harris@citrix.com>
Fri, 19 Jun 2015 10:13:40 +0000 (10:13 +0000)
committerEuan Harris <euan.harris@citrix.com>
Fri, 19 Jun 2015 10:13:40 +0000 (10:13 +0000)
Signed-off-by: Euan Harris <euan.harris@citrix.com>
eventloop_runner.c

index 57cbba00a46c5d810edf0b55e39635a762b6d4d7..0cf34f0410c3e16dc8c429c4b8c2ceb2f18c12de 100644 (file)
@@ -11,17 +11,6 @@ struct pollfd pollfds[NUM_POLL_FDS];
 
 int eventloop_run;
 
-void init_pollfds(struct pollfd *pollfds, int numfds)
-{
-    int i;
-
-    for (i = 0; i < numfds; i++) {
-        pollfds[i].fd = -1;
-        pollfds[i].events = 0;
-        pollfds[i].revents = 0;
-    }
-}
-
 void log_poll_events(struct pollfd pfd)
 {
     if (pfd.revents & POLLIN) {
@@ -61,7 +50,6 @@ void eventloop_start(struct test *tc)
         int timeout;
         struct timeval now;
 
-        init_pollfds(pollfds, NUM_POLL_FDS);
         gettimeofday(&now, NULL);
         libxl_osevent_beforepoll(tc->ctx, &nfds, pollfds, &timeout, now);
         rc = poll(pollfds, NUM_POLL_FDS, 2000);