summaryrefslogtreecommitdiff
path: root/ev.c
diff options
context:
space:
mode:
authorMarc Alexander Lehmann <libev@schmorp.de>2019-06-24 21:27:57 +0000
committerMarc Alexander Lehmann <libev@schmorp.de>2019-06-24 21:27:57 +0000
commit82602c5e08df0e29115fccf57950c669ba4dc4f8 (patch)
treea254ad2c64b6988c92be3bcc7664235bf4d7f7c6 /ev.c
parent30312f2d0dc2f001582db35e1257cb7235da7bde (diff)
downloadlibev-82602c5e08df0e29115fccf57950c669ba4dc4f8.tar.gz
libev-82602c5e08df0e29115fccf57950c669ba4dc4f8.zip
*** empty log message ***
Diffstat (limited to 'ev.c')
-rw-r--r--ev.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ev.c b/ev.c
index 5dfd98b..ab12e63 100644
--- a/ev.c
+++ b/ev.c
@@ -440,7 +440,7 @@
#if EV_USE_LINUXAIO
# include <sys/syscall.h>
-# if !SYS_io_getevents || !EV_USE_EPOLL
+# if !SYS_io_getevents || !EV_USE_EPOLL /* ev_linxaio uses ev_poll.c:ev_epoll_create */
# undef EV_USE_LINUXAIO
# define EV_USE_LINUXAIO 0
# endif
@@ -1991,10 +1991,10 @@ array_realloc (int elem, void *base, int *cur, int cnt)
return ev_realloc (base, elem * *cur);
}
-#define array_needsize_noinit(base,count)
+#define array_needsize_noinit(base,offset,count)
-#define array_needsize_zerofill(base,count) \
- memset ((void *)(base), 0, sizeof (*(base)) * (count))
+#define array_needsize_zerofill(base,offset,count) \
+ memset ((void *)(base + offset), 0, sizeof (*(base)) * (count))
#define array_needsize(type,base,cur,cnt,init) \
if (expect_false ((cnt) > (cur))) \
@@ -2002,7 +2002,7 @@ array_realloc (int elem, void *base, int *cur, int cnt)
ecb_unused int ocur_ = (cur); \
(base) = (type *)array_realloc \
(sizeof (type), (base), &(cur), (cnt)); \
- init ((base) + (ocur_), (cur) - ocur_); \
+ init ((base), ocur_, ((cur) - ocur_)); \
}
#if 0