diff options
author | Joe Perches <joe@perches.com> | 2011-04-10 17:31:32 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-04-25 19:58:34 -0400 |
commit | 9fc86028fa21f8831c0fdc701732cf491da1202c (patch) | |
tree | 36b1aed544c06bda3a0134e8a023115ca957e49b /drivers/staging/vt6656/main_usb.c | |
parent | 60b0fa1af9b323f096fb5335f33cc5b4a8f0198d (diff) |
staging: Remove unnecessary semicolons when if (foo) {...};
Done via perl script:
$ cat remove_semi_if.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(if\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>
Diffstat (limited to 'drivers/staging/vt6656/main_usb.c')
-rw-r--r-- | drivers/staging/vt6656/main_usb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c index af14ab01ed7..9a8eaf135a0 100644 --- a/drivers/staging/vt6656/main_usb.c +++ b/drivers/staging/vt6656/main_usb.c | |||
@@ -709,7 +709,7 @@ static BOOL device_release_WPADEV(PSDevice pDevice) | |||
709 | if(ii>20) | 709 | if(ii>20) |
710 | break; | 710 | break; |
711 | } | 711 | } |
712 | }; | 712 | } |
713 | return TRUE; | 713 | return TRUE; |
714 | } | 714 | } |
715 | 715 | ||
@@ -995,7 +995,7 @@ static BOOL device_init_defrag_cb(PSDevice pDevice) { | |||
995 | DBG_PRT(MSG_LEVEL_ERR,KERN_ERR "%s: can not alloc frag bufs\n", | 995 | DBG_PRT(MSG_LEVEL_ERR,KERN_ERR "%s: can not alloc frag bufs\n", |
996 | pDevice->dev->name); | 996 | pDevice->dev->name); |
997 | goto free_frag; | 997 | goto free_frag; |
998 | }; | 998 | } |
999 | } | 999 | } |
1000 | pDevice->cbDFCB = CB_MAX_RX_FRAG; | 1000 | pDevice->cbDFCB = CB_MAX_RX_FRAG; |
1001 | pDevice->cbFreeDFCB = pDevice->cbDFCB; | 1001 | pDevice->cbFreeDFCB = pDevice->cbDFCB; |