projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: C++ syntax of macOS compat code
[lttng-tools.git]
/
src
/
common
/
compat
/
poll.cpp
diff --git
a/src/common/compat/poll.cpp
b/src/common/compat/poll.cpp
index 928867ffb3f5a9ac5dffbe00d5dd905d89d5e07e..4254ff8bb674fb5bbd743a57c32b04612f574526 100644
(file)
--- a/
src/common/compat/poll.cpp
+++ b/
src/common/compat/poll.cpp
@@
-374,7
+374,7
@@
static int resize_poll_event(struct compat_poll_event_array *array,
goto error;
}
goto error;
}
- ptr = realloc(array->events, new_size * sizeof(*ptr));
+ ptr =
(struct pollfd *)
realloc(array->events, new_size * sizeof(*ptr));
if (ptr == NULL) {
PERROR("realloc epoll add");
goto error;
if (ptr == NULL) {
PERROR("realloc epoll add");
goto error;
@@
-455,7
+455,7
@@
int compat_poll_create(struct lttng_poll_event *events, int size)
wait = &events->wait;
/* This *must* be freed by using lttng_poll_free() */
wait = &events->wait;
/* This *must* be freed by using lttng_poll_free() */
- wait->events = zmalloc(size * sizeof(struct pollfd));
+ wait->events =
(struct pollfd *)
zmalloc(size * sizeof(struct pollfd));
if (wait->events == NULL) {
PERROR("zmalloc struct pollfd");
goto error;
if (wait->events == NULL) {
PERROR("zmalloc struct pollfd");
goto error;
@@
-463,7
+463,7
@@
int compat_poll_create(struct lttng_poll_event *events, int size)
wait->alloc_size = wait->init_size = size;
wait->alloc_size = wait->init_size = size;
- current->events = zmalloc(size * sizeof(struct pollfd));
+ current->events =
(struct pollfd *)
zmalloc(size * sizeof(struct pollfd));
if (current->events == NULL) {
PERROR("zmalloc struct current pollfd");
goto error;
if (current->events == NULL) {
PERROR("zmalloc struct current pollfd");
goto error;
This page took
0.024654 seconds
and
4
git commands to generate.