diff options
| author | 2019-06-05 18:35:19 +0530 | |
|---|---|---|
| committer | 2019-06-05 19:03:06 +0530 | |
| commit | 1dbbcac84f9405feaefa57527fa5e2a754332984 (patch) | |
| tree | f558f1338fc2aa57aa1899b1aee6d503068e24b9 | |
| parent | 7f8766247f0a2f99184e4437a6133c87e826498d (diff) | |
| download | nnn-1dbbcac84f9405feaefa57527fa5e2a754332984.tar.gz | |
Use local buffers for events
| -rw-r--r-- | src/nnn.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1491,10 +1491,10 @@ static int nextsel(int presel) const uint len = LEN(bindings); #ifdef LINUX_INOTIFY struct inotify_event *event; - char *inotify_buf = alloca(EVENT_BUF_LEN); + char inotify_buf[EVENT_BUF_LEN]; memset((void *)inotify_buf, 0x0, EVENT_BUF_LEN); #elif defined(BSD_KQUEUE) - struct kevent *event_data = alloca(sizeof(struct kevent) * NUM_EVENT_SLOTS); + struct kevent event_data[NUM_EVENT_SLOTS]; memset((void *)event_data, 0x0, sizeof(struct kevent) * NUM_EVENT_SLOTS); #endif |