diff options
author | Joe Perches <joe@perches.com> | 2011-04-10 14:31:32 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-04-25 16:58:34 -0700 |
commit | 9fc86028fa21f8831c0fdc701732cf491da1202c (patch) | |
tree | 36b1aed544c06bda3a0134e8a023115ca957e49b /drivers/staging/vt6655/wmgr.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/vt6655/wmgr.c')
-rw-r--r-- | drivers/staging/vt6655/wmgr.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/drivers/staging/vt6655/wmgr.c b/drivers/staging/vt6655/wmgr.c index e540110a430e..71f7726e5ed0 100644 --- a/drivers/staging/vt6655/wmgr.c +++ b/drivers/staging/vt6655/wmgr.c @@ -661,7 +661,7 @@ vMgrDisassocBeginSta( if (*pStatus == CMD_STATUS_PENDING) { pMgmt->eCurrState = WMAC_STATE_IDLE; *pStatus = CMD_STATUS_SUCCESS; - }; + } return; } @@ -1019,7 +1019,7 @@ s_vMgrRxAssocResponse( (sFrame.pSuppRates == 0)){ DBG_PORT80(0xCC); return; - }; + } pMgmt->sAssocInfo.AssocInfo.ResponseFixedIEs.Capabilities = *(sFrame.pwCapInfo); pMgmt->sAssocInfo.AssocInfo.ResponseFixedIEs.StatusCode = *(sFrame.pwStatus); @@ -1039,7 +1039,7 @@ s_vMgrRxAssocResponse( if ( (pMgmt->wCurrAID >> 14) != (BIT0 | BIT1) ) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "AID from AP, has two msb clear.\n"); - }; + } DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "Association Successful, AID=%d.\n", pMgmt->wCurrAID & ~(BIT14|BIT15)); pMgmt->eCurrState = WMAC_STATE_ASSOC; BSSvUpdateAPNode((void *)pDevice, sFrame.pwCapInfo, sFrame.pSuppRates, sFrame.pExtSuppRates); @@ -1692,7 +1692,7 @@ s_vMgrRxDisassociation( //try to send associate packet again because of inactivity timeout // if (pMgmt->eCurrState == WMAC_STATE_ASSOC) { // vMgrReAssocBeginSta((PSDevice)pDevice, pMgmt, &CmdStatus); - // }; + // } if ((pDevice->bWPADEVUp) && (pDevice->skb != NULL)) { wpahdr = (viawget_wpa_header *)pDevice->skb->data; wpahdr->type = VIAWGET_DISASSOC_MSG; @@ -1707,7 +1707,7 @@ s_vMgrRxDisassociation( memset(pDevice->skb->cb, 0, sizeof(pDevice->skb->cb)); netif_rx(pDevice->skb); pDevice->skb = dev_alloc_skb((int)pDevice->rx_buf_sz); - }; + } #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT // if(pDevice->bWPASuppWextEnabled == true) @@ -1778,7 +1778,7 @@ s_vMgrRxDeauthentication( netif_stop_queue(pDevice->dev); pDevice->bLinkPass = false; } - }; + } if ((pDevice->bWPADEVUp) && (pDevice->skb != NULL)) { wpahdr = (viawget_wpa_header *)pDevice->skb->data; @@ -1793,7 +1793,7 @@ s_vMgrRxDeauthentication( memset(pDevice->skb->cb, 0, sizeof(pDevice->skb->cb)); netif_rx(pDevice->skb); pDevice->skb = dev_alloc_skb((int)pDevice->rx_buf_sz); - }; + } #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT // if(pDevice->bWPASuppWextEnabled == true) @@ -1912,7 +1912,7 @@ s_vMgrRxBeacon( (sFrame.pSuppRates == 0) ) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Rx beacon frame error\n"); return; - }; + } if (sFrame.pDSParms != NULL) { @@ -2054,7 +2054,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==true) sFrame.pSSID->len ) == 0) { bIsSSIDEqual = true; - }; + } } if ((WLAN_GET_CAP_INFO_ESS(*sFrame.pwCapInfo)== true) && @@ -2138,8 +2138,8 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==true) if (WLAN_GET_CAP_INFO_ESS(*sFrame.pwCapInfo)) { if (sFrame.pCFParms->wCFPDurRemaining > 0) { // TODO: deal with CFP period to set NAV - }; - }; + } + } HIDWORD(qwTimestamp) = cpu_to_le32(HIDWORD(*sFrame.pqwTimestamp)); LODWORD(qwTimestamp) = cpu_to_le32(LODWORD(*sFrame.pqwTimestamp)); @@ -2160,7 +2160,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==true) } else if (HIDWORD(qwTimestamp) < HIDWORD(qwLocalTSF)) { bTSFOffsetPostive = false; - }; + } if (bTSFOffsetPostive) { qwTSFOffset = CARDqGetTSFOffset(pRxPacket->byRxRate, (qwTimestamp), (qwLocalTSF)); @@ -2218,7 +2218,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==true) if (pMgmt->bInTIM) { PSvSendPSPOLL((PSDevice)pDevice); // DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "BCN:PS-POLL sent..\n"); - }; + } } else { @@ -2231,7 +2231,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==true) } if(PSbConsiderPowerDown(pDevice, false, false)) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "BCN: Power down now...\n"); - }; + } } } @@ -2316,7 +2316,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==true) pMgmt->sNodeDBTable[0].bActive = true; pMgmt->sNodeDBTable[0].uInActiveCount = 0; - }; + } } else if (bIsSSIDEqual) { @@ -2356,9 +2356,9 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==true) // Prepare beacon frame bMgrPrepareBeaconToSend((void *)pDevice, pMgmt); // } - }; + } } - }; + } // endian issue ??? // Update TSF if (bUpdateTSF) { @@ -2590,7 +2590,7 @@ vMgrCreateOwnIBSS( pMgmt->byCSSPK = KEY_CTL_WEP; pMgmt->byCSSGK = KEY_CTL_WEP; } - }; + } pMgmt->byERPContext = 0; @@ -2683,7 +2683,7 @@ vMgrJoinBSSBegin( *pStatus = CMD_STATUS_RESOURCES; DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "BSS finding:BSS list is empty.\n"); return; - }; + } // memset(pMgmt->abyDesireBSSID, 0, WLAN_BSSID_LEN); // Search known BSS list for prefer BSSID or SSID @@ -2699,7 +2699,7 @@ vMgrJoinBSSBegin( pItemSSID = (PWLAN_IE_SSID)pMgmt->abyDesireSSID; DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Scanning [%s] not found, disconnected !\n", pItemSSID->abySSID); return; - }; + } DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "AP(BSS) finding:Found a AP(BSS)..\n"); if (WLAN_GET_CAP_INFO_ESS(cpu_to_le16(pCurr->wCapInfo))){ @@ -4343,7 +4343,7 @@ s_vMgrRxProbeResponse( DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Probe resp:Fail addr:[%p] \n", pRxPacket->p80211Header); DBG_PORT80(0xCC); return; - }; + } if(sFrame.pSSID->len == 0) DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Rx Probe resp: SSID len = 0 \n"); @@ -4625,7 +4625,7 @@ vMgrRxManagePacket( //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx beacon\n"); if (pMgmt->eScanState != WMAC_NO_SCANNING) { bInScan = true; - }; + } s_vMgrRxBeacon(pDevice, pMgmt, pRxPacket, bInScan); break; |