static void lttng_kernel_probe_location_symbol_destroy(struct lttng_kernel_probe_location *location)
{
- struct lttng_kernel_probe_location_symbol *location_symbol = NULL;
+ struct lttng_kernel_probe_location_symbol *location_symbol = nullptr;
LTTNG_ASSERT(location);
struct lttng_kernel_probe_location *lttng_kernel_probe_location_address_create(uint64_t address)
{
- struct lttng_kernel_probe_location *ret = NULL;
+ struct lttng_kernel_probe_location *ret = nullptr;
struct lttng_kernel_probe_location_address *location;
location = zmalloc<lttng_kernel_probe_location_address>();
struct lttng_kernel_probe_location *
lttng_kernel_probe_location_symbol_create(const char *symbol_name, uint64_t offset)
{
- char *symbol_name_copy = NULL;
- struct lttng_kernel_probe_location *ret = NULL;
+ char *symbol_name_copy = nullptr;
+ struct lttng_kernel_probe_location *ret = nullptr;
struct lttng_kernel_probe_location_symbol *location;
if (!symbol_name || strlen(symbol_name) >= LTTNG_SYMBOL_NAME_LEN) {
const char *
lttng_kernel_probe_location_symbol_get_name(const struct lttng_kernel_probe_location *location)
{
- const char *ret = NULL;
+ const char *ret = nullptr;
struct lttng_kernel_probe_location_symbol *symbol_location;
if (!location ||
LTTNG_ASSERT(a->symbol_name);
LTTNG_ASSERT(b->symbol_name);
- if (strcmp(a->symbol_name, b->symbol_name)) {
+ if (strcmp(a->symbol_name, b->symbol_name) != 0) {
goto end;
}
static struct lttng_kernel_probe_location *
lttng_kernel_probe_location_symbol_copy(const struct lttng_kernel_probe_location *location)
{
- struct lttng_kernel_probe_location *new_location = NULL;
+ struct lttng_kernel_probe_location *new_location = nullptr;
enum lttng_kernel_probe_location_status status;
- const char *symbol_name = NULL;
+ const char *symbol_name = nullptr;
uint64_t offset;
LTTNG_ASSERT(location);
goto end;
error:
- new_location = NULL;
+ new_location = nullptr;
end:
return new_location;
}
static struct lttng_kernel_probe_location *
lttng_kernel_probe_location_address_copy(const struct lttng_kernel_probe_location *location)
{
- struct lttng_kernel_probe_location *new_location = NULL;
+ struct lttng_kernel_probe_location *new_location = nullptr;
enum lttng_kernel_probe_location_status status;
uint64_t address;
goto end;
error:
- new_location = NULL;
+ new_location = nullptr;
end:
return new_location;
}
struct lttng_kernel_probe_location *
lttng_kernel_probe_location_copy(const struct lttng_kernel_probe_location *location)
{
- struct lttng_kernel_probe_location *new_location = NULL;
+ struct lttng_kernel_probe_location *new_location = nullptr;
enum lttng_kernel_probe_location_type type;
if (!location) {
}
break;
default:
- new_location = NULL;
+ new_location = nullptr;
goto err;
}
err:
int ret;
enum lttng_error_code ret_code;
enum lttng_kernel_probe_location_status status;
- const char *name = NULL;
+ const char *name = nullptr;
uint64_t offset;
LTTNG_ASSERT(location);