summaryrefslogtreecommitdiff
path: root/source4/lib/events
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/events')
-rw-r--r--source4/lib/events/events_standard.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/lib/events/events_standard.c b/source4/lib/events/events_standard.c
index 96f938c78e..76c8c4768a 100644
--- a/source4/lib/events/events_standard.c
+++ b/source4/lib/events/events_standard.c
@@ -357,8 +357,8 @@ static int std_event_loop_epoll(struct event_context *ev, struct timeval *tvalp)
struct std_event_context *std_ev = talloc_get_type(ev->additional_data,
struct std_event_context);
int ret, i;
- const int maxevents = 8;
- struct epoll_event events[maxevents];
+#define MAXEVENTS 8
+ struct epoll_event events[MAXEVENTS];
uint32_t destruction_count = std_ev->destruction_count;
int timeout = -1;
@@ -367,7 +367,7 @@ static int std_event_loop_epoll(struct event_context *ev, struct timeval *tvalp)
timeout = ((tvalp->tv_usec+999) / 1000) + (tvalp->tv_sec*1000);
}
- ret = epoll_wait(std_ev->epoll_fd, events, maxevents, timeout);
+ ret = epoll_wait(std_ev->epoll_fd, events, MAXEVENTS, timeout);
if (ret == -1 && errno != EINTR) {
epoll_fallback_to_select(ev, "epoll_wait() failed");