Skip to content

Commit

Permalink
Add braces around switch inside for/while loop
Browse files Browse the repository at this point in the history
in order to make it look OK after clang-format.
  • Loading branch information
bertfrees committed Oct 3, 2017
1 parent dd1122b commit 922daa5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion liblouis/pattern.c
Expand Up @@ -824,7 +824,7 @@ static int pattern_compile_expression(const widechar *input,
EXPR_TYPE(*expr_crs) = PTN_ATTRIBUTES;

attrs0 = attrs1 = 0;
for( ; (*input_crs) < input_end; (*input_crs)++)
for( ; (*input_crs) < input_end; (*input_crs)++) {
switch(input[*input_crs])
{
case '_': attrs0 |= CTC_Space; break;
Expand All @@ -850,6 +850,7 @@ static int pattern_compile_expression(const widechar *input,

default: return 0;
}
}
EXPR_DATA_0(*expr_crs) = attrs1;
EXPR_DATA_1(*expr_crs) = attrs0;

Expand Down
3 changes: 2 additions & 1 deletion tools/lou_allround.c
Expand Up @@ -279,7 +279,7 @@ main (int argc, char **argv)

set_program_name (argv[0]);

while ((optc = getopt_long (argc, argv, "hv", longopts, NULL)) != -1)
while ((optc = getopt_long (argc, argv, "hv", longopts, NULL)) != -1) {
switch (optc)
{
/* --help and --version exit immediately, per GNU coding standards. */
Expand All @@ -297,6 +297,7 @@ main (int argc, char **argv)
exit (EXIT_FAILURE);
break;
}
}

if (optind < argc)
{
Expand Down
3 changes: 2 additions & 1 deletion tools/lou_translate.c
Expand Up @@ -147,7 +147,7 @@ main (int argc, char **argv)

set_program_name (argv[0]);

while ((optc = getopt_long (argc, argv, "hvfb", longopts, NULL)) != -1)
while ((optc = getopt_long (argc, argv, "hvfb", longopts, NULL)) != -1) {
switch (optc)
{
/* --help and --version exit immediately, per GNU coding standards. */
Expand All @@ -171,6 +171,7 @@ main (int argc, char **argv)
exit (EXIT_FAILURE);
break;
}
}

if (forward_flag && backward_flag)
{
Expand Down

0 comments on commit 922daa5

Please sign in to comment.