((as_type) (std::is_signed<as_type>::value ? (value_ptr)->u._signed : \
(value_ptr)->u._unsigned))
-#define SET_INTEGRAL_COMM_VALUE(comm_value, val) \
- if (std::is_signed<typeof(val)>::value) { \
- (comm_value)->u._signed = (typeof((comm_value)->u._signed)) val; \
- } else { \
- (comm_value)->u._unsigned = (typeof((comm_value)->u._unsigned)) val; \
+#define SET_INTEGRAL_COMM_VALUE(comm_value, val) \
+ if (std::is_signed<typeof(val)>::value) { \
+ (comm_value)->u._signed = (typeof((comm_value)->u._signed)) (val); \
+ } else { \
+ (comm_value)->u._unsigned = (typeof((comm_value)->u._unsigned)) (val); \
}
static inline bool is_virtual_process_attr(enum lttng_process_attr process_attr)
const struct lttng_buffer_view *value_view,
struct process_attr_value **_value)
{
- char *name = NULL;
+ char *name = nullptr;
enum lttng_error_code ret = LTTNG_OK;
struct process_attr_value *value = zmalloc<process_attr_value>();
}
value->value.user_name = name;
- name = NULL;
+ name = nullptr;
break;
default:
ERR("Invalid value type used for user ID process attribute");
}
value->value.group_name = name;
- name = NULL;
+ name = nullptr;
break;
default:
ERR("Invalid value type used for group ID process attribute");
}
*_value = value;
- value = NULL;
+ value = nullptr;
free(name);
return LTTNG_OK;
error:
process_attr_value_destroy(value);
}
-struct lttng_process_attr_values *lttng_process_attr_values_create(void)
+struct lttng_process_attr_values *lttng_process_attr_values_create()
{
struct lttng_process_attr_values *values = zmalloc<lttng_process_attr_values>();
.type = (int32_t) value->type,
.value = {},
};
- const char *name = NULL;
+ const char *name = nullptr;
switch (value->type) {
case LTTNG_PROCESS_ATTR_VALUE_TYPE_PID:
struct process_attr_value *process_attr_value_copy(const struct process_attr_value *value)
{
- struct process_attr_value *new_value = NULL;
+ struct process_attr_value *new_value = nullptr;
if (!value) {
goto end;
return new_value;
error:
free(new_value);
- return NULL;
+ return nullptr;
}
unsigned long process_attr_value_hash(const struct process_attr_value *a)