projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: move memset in channel_set_attr after NULL check
[lttng-tools.git]
/
src
/
lib
/
lttng-ctl
/
lttng-ctl.c
diff --git
a/src/lib/lttng-ctl/lttng-ctl.c
b/src/lib/lttng-ctl/lttng-ctl.c
index 96a54f881c8e5df2b9225bed57997be0c4339cda..a1256e12d981aa5da93c7aed8f7784e24732be9b 100644
(file)
--- a/
src/lib/lttng-ctl/lttng-ctl.c
+++ b/
src/lib/lttng-ctl/lttng-ctl.c
@@
-912,13
+912,13
@@
int lttng_calibrate(struct lttng_handle *handle,
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;
This page took
0.024715 seconds
and
4
git commands to generate.