From 89ae245c4524f87cc8fe112d093457765e35d7f1 Mon Sep 17 00:00:00 2001 From: James Hunt Date: Fri, 7 Oct 2011 16:32:46 +0100 Subject: Remove alloca(3) call to avoid surprises if stack space exhausted. --- src/libply/ply-event-loop.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/src/libply/ply-event-loop.c b/src/libply/ply-event-loop.c index a418c4e..6f1f6d7 100644 --- a/src/libply/ply-event-loop.c +++ b/src/libply/ply-event-loop.c @@ -1255,13 +1255,10 @@ void ply_event_loop_process_pending_events (ply_event_loop_t *loop) { int number_of_received_events, i; - struct epoll_event *events = NULL; + struct epoll_event events[PLY_EVENT_LOOP_NUM_EVENT_HANDLERS]; assert (loop != NULL); - events = - alloca (PLY_EVENT_LOOP_NUM_EVENT_HANDLERS * sizeof (struct epoll_event)); - memset (events, -1, PLY_EVENT_LOOP_NUM_EVENT_HANDLERS * sizeof (struct epoll_event)); -- 1.7.5.4