Signed-off-by: Danny Serres <danny.serres@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
void lttng_channel_set_default_attr(struct lttng_domain *domain,
struct lttng_channel_attr *attr)
{
void lttng_channel_set_default_attr(struct lttng_domain *domain,
struct lttng_channel_attr *attr)
{
- memset(attr, 0, sizeof(struct lttng_channel_attr));
-
/* Safety check */
if (attr == NULL || domain == NULL) {
return;
}
/* Safety check */
if (attr == NULL || domain == NULL) {
return;
}
+ memset(attr, 0, sizeof(struct lttng_channel_attr));
+
switch (domain->type) {
case LTTNG_DOMAIN_KERNEL:
attr->overwrite = DEFAULT_CHANNEL_OVERWRITE;
switch (domain->type) {
case LTTNG_DOMAIN_KERNEL:
attr->overwrite = DEFAULT_CHANNEL_OVERWRITE;