/* Long check */
LTTNG_ASSERT(a->name);
LTTNG_ASSERT(b->name);
- if (strcmp(a->name, b->name)) {
+ if (strcmp(a->name, b->name) != 0) {
goto end;
}
__attribute__((unused)))
{
/* Not supported. */
- return NULL;
+ return nullptr;
}
static const struct lttng_bytecode *
__attribute__((unused)))
{
/* Not supported. */
- return NULL;
+ return nullptr;
}
static enum lttng_event_rule_generate_exclusions_status
struct lttng_event_exclusion **exclusions)
{
/* Not supported. */
- *exclusions = NULL;
+ *exclusions = nullptr;
return LTTNG_EVENT_RULE_GENERATE_EXCLUSIONS_STATUS_NONE;
}
const struct lttng_kernel_probe_location *location)
{
int ret;
- struct lttng_kernel_probe_location *location_copy = NULL;
+ struct lttng_kernel_probe_location *location_copy = nullptr;
if (!kprobe || !location || kprobe->location) {
ret = -1;
}
kprobe->location = location_copy;
- location_copy = NULL;
+ location_copy = nullptr;
ret = 0;
end:
lttng_kernel_probe_location_destroy(location_copy);
int ret;
enum lttng_error_code ret_code;
enum lttng_event_rule_status status;
- const char *event_name = NULL;
- const struct lttng_kernel_probe_location *location = NULL;
+ const char *event_name = nullptr;
+ const struct lttng_kernel_probe_location *location = nullptr;
LTTNG_ASSERT(rule);
LTTNG_ASSERT(writer);
struct lttng_event_rule *
lttng_event_rule_kernel_kprobe_create(const struct lttng_kernel_probe_location *location)
{
- struct lttng_event_rule *rule = NULL;
+ struct lttng_event_rule *rule = nullptr;
struct lttng_event_rule_kernel_kprobe *krule;
krule = zmalloc<lttng_event_rule_kernel_kprobe>();
if (kernel_probe_set_location(krule, location)) {
lttng_event_rule_destroy(rule);
- rule = NULL;
+ rule = nullptr;
}
end:
const struct lttng_event_rule_kernel_kprobe_comm *kprobe_comm;
const char *name;
struct lttng_buffer_view current_buffer_view;
- struct lttng_event_rule *rule = NULL;
- struct lttng_kernel_probe_location *location = NULL;
+ struct lttng_event_rule *rule = nullptr;
+ struct lttng_kernel_probe_location *location = nullptr;
if (!_event_rule) {
ret = -1;
}
*_event_rule = rule;
- rule = NULL;
+ rule = nullptr;
ret = offset;
end:
lttng_kernel_probe_location_destroy(location);
enum lttng_event_rule_status
lttng_event_rule_kernel_kprobe_set_event_name(struct lttng_event_rule *rule, const char *name)
{
- char *name_copy = NULL;
+ char *name_copy = nullptr;
struct lttng_event_rule_kernel_kprobe *kprobe;
enum lttng_event_rule_status status = LTTNG_EVENT_RULE_STATUS_OK;
free(kprobe->name);
kprobe->name = name_copy;
- name_copy = NULL;
+ name_copy = nullptr;
end:
return status;
}