maint: style changes

* src/scan-code.l: Remove useless braces.
Formatting changes.
Prefer NULL to 0.
* src/muscle-tab.c, src/system.h: Formatting changes.
This commit is contained in:
Akim Demaille
2012-07-25 17:57:57 +02:00
parent f9b8635172
commit 9b8585410a
4 changed files with 110 additions and 112 deletions

View File

@@ -181,19 +181,17 @@ ref -?[0-9]+|{id}|"["{id}"]"|"$"
<SC_RULE_ACTION> <SC_RULE_ACTION>
{ {
"$"("<"{tag}">")?{ref} { "$"("<"{tag}">")?{ref} {
ref_tail_fields = 0; ref_tail_fields = NULL;
handle_action_dollar (self->rule, yytext, *loc); handle_action_dollar (self->rule, yytext, *loc);
if (ref_tail_fields) { if (ref_tail_fields)
obstack_sgrow (&obstack_for_string, ref_tail_fields); obstack_sgrow (&obstack_for_string, ref_tail_fields);
}
need_semicolon = true; need_semicolon = true;
} }
"@"{ref} { "@"{ref} {
ref_tail_fields = 0; ref_tail_fields = NULL;
handle_action_at (self->rule, yytext, *loc); handle_action_at (self->rule, yytext, *loc);
if (ref_tail_fields) { if (ref_tail_fields)
obstack_sgrow (&obstack_for_string, ref_tail_fields); obstack_sgrow (&obstack_for_string, ref_tail_fields);
}
need_semicolon = true; need_semicolon = true;
} }
"$" { "$" {
@@ -345,7 +343,7 @@ typedef struct
not visible from current midrule. */ not visible from current midrule. */
#define VARIANT_NOT_VISIBLE_FROM_MIDRULE (1 << 2) #define VARIANT_NOT_VISIBLE_FROM_MIDRULE (1 << 2)
static variant *variant_table = 0; static variant *variant_table = NULL;
static unsigned variant_table_size = 0; static unsigned variant_table_size = 0;
static unsigned variant_count = 0; static unsigned variant_count = 0;
@@ -367,7 +365,7 @@ static void
variant_table_free (void) variant_table_free (void)
{ {
free (variant_table); free (variant_table);
variant_table = 0; variant_table = NULL;
variant_table_size = variant_count = 0; variant_table_size = variant_count = 0;
} }