diff options
Diffstat (limited to 'tools/lib/api/fd/array.c')
-rw-r--r-- | tools/lib/api/fd/array.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/lib/api/fd/array.c b/tools/lib/api/fd/array.c index 0e636c4339b8..b0a035fc87b3 100644 --- a/tools/lib/api/fd/array.c +++ b/tools/lib/api/fd/array.c | |||
@@ -85,7 +85,8 @@ int fdarray__add(struct fdarray *fda, int fd, short revents) | |||
85 | } | 85 | } |
86 | 86 | ||
87 | int fdarray__filter(struct fdarray *fda, short revents, | 87 | int fdarray__filter(struct fdarray *fda, short revents, |
88 | void (*entry_destructor)(struct fdarray *fda, int fd)) | 88 | void (*entry_destructor)(struct fdarray *fda, int fd, void *arg), |
89 | void *arg) | ||
89 | { | 90 | { |
90 | int fd, nr = 0; | 91 | int fd, nr = 0; |
91 | 92 | ||
@@ -95,7 +96,7 @@ int fdarray__filter(struct fdarray *fda, short revents, | |||
95 | for (fd = 0; fd < fda->nr; ++fd) { | 96 | for (fd = 0; fd < fda->nr; ++fd) { |
96 | if (fda->entries[fd].revents & revents) { | 97 | if (fda->entries[fd].revents & revents) { |
97 | if (entry_destructor) | 98 | if (entry_destructor) |
98 | entry_destructor(fda, fd); | 99 | entry_destructor(fda, fd, arg); |
99 | 100 | ||
100 | continue; | 101 | continue; |
101 | } | 102 | } |