linux/drivers/staging/crystalhd
Joe Perches 95cd17c9f3 staging: Remove unnecessary semicolons when switch (foo) {...};
Done via perl script:

$ cat remove_semi_switch.pl
my $match_balanced_parentheses = qr/(\((?:[^\(\)]++|(?-1))*\))/;
my $match_balanced_braces      = qr/(\{(?:[^\{\}]++|(?-1))*\})/;

foreach my $file (@ARGV) {
    my $f;
    my $text;
    my $oldtext;

    next if ((-d $file));

    open($f, '<', $file)
	or die "$P: Can't open $file for read\n";
    $oldtext = do { local($/) ; <$f> };
    close($f);

    next if ($oldtext eq "");

    $text = $oldtext;

    my $count = 0;
    do {
	$count = 0;
	$count += $text =~ s@\b(switch\s*${match_balanced_parentheses}\s*)${match_balanced_braces}\s*;@"$1$3"@egx;
    } while ($count > 0);

    if ($text ne $oldtext) {
	my $newfile = $file;

	open($f, '>', $newfile)
	    or die "$P: Can't open $newfile for write\n";
	print $f $text;
	close($f);
    }
}

$

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-25 16:58:35 -07:00
..
Kconfig
Makefile Staging: crystalhd: Makefile: replace the use of <module>-objs with <module>-y 2010-10-08 07:23:52 -07:00
TODO
bc_dts_defs.h
bc_dts_glob_lnx.h
bc_dts_types.h staging: crystalhd: remove unused typedef bc_bool_t 2011-04-20 13:48:24 -07:00
bcm_70012_regs.h
crystalhd_cmds.c Fix common misspellings 2011-03-31 11:26:23 -03:00
crystalhd_cmds.h
crystalhd_fw_if.h
crystalhd_hw.c Fix common misspellings 2011-03-31 11:26:23 -03:00
crystalhd_hw.h
crystalhd_lnx.c staging: crystalhd: fix memory leaks 2011-03-14 12:23:34 -07:00
crystalhd_lnx.h staging: crystalhd: fix signed bug 2010-09-16 12:37:34 -07:00
crystalhd_misc.c staging: Remove unnecessary semicolons when switch (foo) {...}; 2011-04-25 16:58:35 -07:00
crystalhd_misc.h