projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Docs: misleading documentation of compat_epoll_create
[lttng-tools.git]
/
src
/
common
/
notification.c
diff --git
a/src/common/notification.c
b/src/common/notification.c
index 3826534cda89e3833e75cba2311020388744adb3..e32737dce89ce94d5c4e7c58e06ef16fee92a063 100644
(file)
--- a/
src/common/notification.c
+++ b/
src/common/notification.c
@@
-40,13
+40,12
@@
struct lttng_notification *lttng_notification_create(
notification->condition = condition;
notification->evaluation = evaluation;
notification->condition = condition;
notification->evaluation = evaluation;
- notification->owns_elements = false;
end:
return notification;
}
LTTNG_HIDDEN
end:
return notification;
}
LTTNG_HIDDEN
-int lttng_notification_serialize(struct lttng_notification *notification,
+int lttng_notification_serialize(
const
struct lttng_notification *notification,
struct lttng_dynamic_buffer *buf)
{
int ret;
struct lttng_dynamic_buffer *buf)
{
int ret;
@@
-57,6
+56,9
@@
int lttng_notification_serialize(struct lttng_notification *notification,
header_offset = buf->size;
ret = lttng_dynamic_buffer_append(buf, ¬ification_comm,
sizeof(notification_comm));
header_offset = buf->size;
ret = lttng_dynamic_buffer_append(buf, ¬ification_comm,
sizeof(notification_comm));
+ if (ret) {
+ goto end;
+ }
size_before_payload = buf->size;
ret = lttng_condition_serialize(notification->condition,
size_before_payload = buf->size;
ret = lttng_condition_serialize(notification->condition,
@@
-134,7
+136,6
@@
ssize_t lttng_notification_create_from_buffer(
goto error;
}
ret = notification_size;
goto error;
}
ret = notification_size;
- (*notification)->owns_elements = true;
end:
return ret;
error:
end:
return ret;
error:
@@
-149,10
+150,8
@@
void lttng_notification_destroy(struct lttng_notification *notification)
return;
}
return;
}
- if (notification->owns_elements) {
- lttng_condition_destroy(notification->condition);
- lttng_evaluation_destroy(notification->evaluation);
- }
+ lttng_condition_destroy(notification->condition);
+ lttng_evaluation_destroy(notification->evaluation);
free(notification);
}
free(notification);
}
This page took
0.024072 seconds
and
4
git commands to generate.