lttng_payload payload;
int ret = 0;
+ if (handle == nullptr || ev == nullptr) {
+ return -LTTNG_ERR_INVALID;
+ }
+
+ /*
+ * Empty filter string will always be rejected by the parser
+ * anyway, so treat this corner-case early to eliminate
+ * lttng_fmemopen error for 0-byte allocation.
+ */
+ if (original_filter_expression && strlen(original_filter_expression) == 0) {
+ return -LTTNG_ERR_INVALID;
+ }
+
if (ev->type == LTTNG_EVENT_ALL) {
/*
* Since we modify the user's parameter, ensure it is set back to its original value
return syscall_ret;
}
- if (handle == nullptr || ev == nullptr) {
- return -LTTNG_ERR_INVALID;
- }
-
- /*
- * Empty filter string will always be rejected by the parser
- * anyway, so treat this corner-case early to eliminate
- * lttng_fmemopen error for 0-byte allocation.
- */
- if (original_filter_expression && strlen(original_filter_expression) == 0) {
- return -LTTNG_ERR_INVALID;
- }
-
/*
* We have either a filter or some exclusions, so we need to set up
* a variable-length payload from where to send the data.