Fix: add missing semicolons after MSG, DBG, ERR print macros
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/4 Fix: add missing semicolons after MSG, DBG, ERR print macros
Signed-off-by Mathieu Desnoyers <[email protected]>
--- src/bin/lttng/commands/add_context.c | 2 +- src/common/consumer/consumer.c | 2 +- src/common/runas.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
src/bin/lttng/commands/add_context.c +1 -1
@@ -609,7 +609,7 @@ static int add_context(char *session_name) opt_channel_name); }else {MSG ("%s context %s added to all channels" , - get_domain_str(dom.type), type->opt->symbol) +get_domain_str (dom.type), type->opt->symbol); } success =1 ; }
src/common/consumer/consumer.c +1 -1
@@ -1021,7 +1021,7 @@ struct lttng_consumer_channel *consumer_allocate_channel(uint64_t key,CDS_INIT_LIST_HEAD (&channel->streams.head); - DBG("Allocated channel (key %" PRIu64 ")", channel->key) +DBG ("Allocated channel (key %" PRIu64")" , channel->key); end:return channel;
src/common/runas.c +1 -1
@@ -171,7 +171,7 @@ run_as_fct run_as_enum_to_fct(enum run_as_cmd cmd)case RUN_AS_MKDIR_RECURSIVE :return _mkdir_recursive;default : - ERR("Unknown command %d", (int) cmd) +ERR ("Unknown command %d" , (int ) cmd);return NULL ; } }
Signature · 6 lines
2.1.4 _______________________________________________ lttng-dev mailing list [email protected] https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
PATCH 2/4 Fix: coding style document has erroneous semicolon at end of macro
In reply to a message not in the archiveSigned-off-by Mathieu Desnoyers <[email protected]>
--- CodingStyle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
CodingStyle +1 -1
@@ -36,7 +36,7 @@ Use space to indent the '\' at the end but tabs at the beginning. #define a_macro(x) \ do { \ fsync(); \ - } while (0); \ + } while (0) It's really the only time we use spaces. For everything else, there is TABS! :)
Signature · 6 lines
2.1.4 _______________________________________________ lttng-dev mailing list [email protected] https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
PATCH 3/4 Update coding style document for macro style
In reply to a message not in the archiveSigned-off-by Mathieu Desnoyers <[email protected]>
--- CodingStyle | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-)
CodingStyle +13 -5
@@ -31,14 +31,22 @@ enum my_enum { #define DEFAULT_VALUE_OF_SOME_SORT 6 #define THE_ANSWER 42 -Use space to indent the '\' at the end but tabs at the beginning. +Use either a single space or tabs to indent the '\' at the end of lines. +Use tabs at the beginning of lines. -#define a_macro(x) \ - do { \ - fsync(); \ +Either: + +#define a_macro(x) \ + do { \ + fsync(); \ } while (0) -It's really the only time we use spaces. For everything else, there is TABS! :) +or + +#define a_macro(x) \ + do { \ + fsync(); \ + } while (0) Here is a pretty cool vim macro that will highlight your whitespaces and spaces before tab. This helps a *LOT* when coding.
Signature · 6 lines
2.1.4 _______________________________________________ lttng-dev mailing list [email protected] https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
A message that is not in the archive (sent off-list or not yet received): [email protected]
All four patches merged, thanks!
Jérémie
Quoted 49 lines · Mathieu Desnoyers
Signed-off-by Mathieu Desnoyers <[email protected]>--- src/bin/lttng/commands/add_context.c | 2 +- src/common/consumer/consumer.c | 2 +- src/common/runas.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)src/bin/lttng/commands/add_context.c +1
-1@@ -609,7 +609,7 @@ static int add_context(char *session_name) opt_channel_name); }else {MSG ("%s context %s added to all channels" , - get_domain_str(dom.type), type->opt->symbol) +get_domain_str (dom.type), type->opt->symbol); } success =1 ; }src/common/consumer/consumer.c +1
-1@@ -1021,7 +1021,7 @@ struct lttng_consumer_channel *consumer_allocate_channel(uint64_t key,CDS_INIT_LIST_HEAD (&channel->streams.head); - DBG("Allocated channel (key %" PRIu64 ")", channel->key) +DBG ("Allocated channel (key %" PRIu64")" , channel->key); end:return channel;src/common/runas.c +1
-2@@ -171,7 +171,7 @@ run_as_fct run_as_enum_to_fct(enum run_as_cmd cmd)case RUN_AS_MKDIR_RECURSIVE :return _mkdir_recursive;default : - ERR("Unknown command %d", (int) cmd) +ERR ("Unknown command %d" , (int ) cmd);return NULL ; } } --2.1.4
Signature · 7 lines
Jérémie Galarneau EfficiOS Inc. http://www.efficios.com _______________________________________________ lttng-dev mailing list [email protected] https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev