Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
* [lttng-dev] [lttng-tools PATCH] Move metset in channel_set_attr after the null check
@ 2012-06-06 18:54 Danny Serres
  2012-06-06 19:40 ` Mathieu Desnoyers
  2012-06-07 17:05 ` David Goulet
  0 siblings, 2 replies; 4+ messages in thread
From: Danny Serres @ 2012-06-06 18:54 UTC (permalink / raw)


Signed-off-by: Danny Serres <serres at live.ca>
---
 src/lib/lttng-ctl/lttng-ctl.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/lttng-ctl/lttng-ctl.c b/src/lib/lttng-ctl/lttng-ctl.c
index 36069ef..356fb34 100644
--- a/src/lib/lttng-ctl/lttng-ctl.c
+++ b/src/lib/lttng-ctl/lttng-ctl.c
@@ -885,13 +885,13 @@ int lttng_calibrate(struct lttng_handle *handle,
 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;
 	}
 
+	memset(attr, 0, sizeof(struct lttng_channel_attr));
+
 	switch (domain->type) {
 	case LTTNG_DOMAIN_KERNEL:
 		attr->overwrite = DEFAULT_CHANNEL_OVERWRITE;
-- 
1.7.9.5




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-06-07 17:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-06 18:54 [lttng-dev] [lttng-tools PATCH] Move metset in channel_set_attr after the null check Danny Serres
2012-06-06 19:40 ` Mathieu Desnoyers
2012-06-07 17:05 ` David Goulet
2012-06-07 17:43   ` Yannick Brosseau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox