From: Johan Meiring <johanmeiring@gmail.com>
To: pe1dnn@amsat.org, jkosina@suse.cz, standby24x7@gmail.com,
viro@zeniv.linux.org.uk, gregkh@linuxfoundation.org
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
Johan Meiring <johanmeiring@gmail.com>
Subject: [PATCH 08/32] staging: wlags49_h2: wl_enc: corrects spacing around parentheses
Date: Fri, 30 Nov 2012 18:58:33 +0200 [thread overview]
Message-ID: <1354294737-5735-8-git-send-email-johanmeiring@gmail.com> (raw)
In-Reply-To: <1354294737-5735-1-git-send-email-johanmeiring@gmail.com>
This commit corrects various instances where the use of spaces
around parentheses was incorrect.
Signed-off-by: Johan Meiring <johanmeiring@gmail.com>
---
drivers/staging/wlags49_h2/wl_enc.c | 46 +++++++++++++++++------------------
1 file changed, 23 insertions(+), 23 deletions(-)
diff --git a/drivers/staging/wlags49_h2/wl_enc.c b/drivers/staging/wlags49_h2/wl_enc.c
index a62db46..1d143cd 100644
--- a/drivers/staging/wlags49_h2/wl_enc.c
+++ b/drivers/staging/wlags49_h2/wl_enc.c
@@ -105,7 +105,7 @@ extern dbg_info_t *DbgInfo;
* OK
*
******************************************************************************/
-int wl_wep_code( char *szCrypt, char *szDest, void *Data, int nLen )
+int wl_wep_code(char *szCrypt, char *szDest, void *Data, int nLen)
{
int i;
int t;
@@ -115,16 +115,16 @@ int wl_wep_code( char *szCrypt, char *szDest, void *Data, int nLen )
/*------------------------------------------------------------------------*/
- for( i = bits = 0 ; i < MACADDRESS_STR_LEN; i++ ) {
+ for (i = bits = 0; i < MACADDRESS_STR_LEN; i++) {
bits ^= szCrypt[i];
bits += szCrypt[i];
}
- for( i = t = *szDest = 0; i < nLen; i++, t++ ) {
- k = szData[i] ^ ( bits + i );
+ for (i = t = *szDest = 0; i < nLen; i++, t++) {
+ k = szData[i] ^ (bits + i);
- switch( i % 3 ) {
+ switch (i % 3) {
case 0 :
@@ -137,8 +137,8 @@ int wl_wep_code( char *szCrypt, char *szDest, void *Data, int nLen )
case 1 :
- szDest[t] += (( k & 0xF0 ) >> 4 );
- szDest[t+1] = (( k & 0x0F ) << 2 ) + CH_START ;
+ szDest[t] += ((k & 0xF0) >> 4);
+ szDest[t+1] = ((k & 0x0F) << 2) + CH_START ;
szDest[t+2] = '\0';
break;
@@ -146,8 +146,8 @@ int wl_wep_code( char *szCrypt, char *szDest, void *Data, int nLen )
case 2 :
- szDest[t] += (( k & 0xC0 ) >> 6 );
- szDest[t+1] = ( k & 0x3F ) + CH_START ;
+ szDest[t] += ((k & 0xC0) >> 6);
+ szDest[t+1] = (k & 0x3F) + CH_START ;
szDest[t+2] = '\0';
t++;
@@ -155,7 +155,7 @@ int wl_wep_code( char *szCrypt, char *szDest, void *Data, int nLen )
}
}
- return( strlen( szDest )) ;
+ return(strlen(szDest)) ;
}
/*============================================================================*/
@@ -182,7 +182,7 @@ int wl_wep_code( char *szCrypt, char *szDest, void *Data, int nLen )
* OK
*
******************************************************************************/
-int wl_wep_decode( char *szCrypt, void *Dest, char *szData )
+int wl_wep_decode(char *szCrypt, void *Dest, char *szData)
{
int i;
int t;
@@ -192,40 +192,40 @@ int wl_wep_decode( char *szCrypt, void *Dest, char *szData )
/*------------------------------------------------------------------------*/
- for( i = bits = 0 ; i < 12; i++ ) {
+ for (i = bits = 0; i < 12; i++) {
bits ^= szCrypt[i] ;
bits += szCrypt[i] ;
}
- nLen = ( strlen( szData ) * 3) / 4 ;
+ nLen = (strlen(szData) * 3) / 4 ;
- for( i = t = 0; i < nLen; i++, t++ ) {
- switch( i % 3 ) {
+ for (i = t = 0; i < nLen; i++, t++) {
+ switch (i % 3) {
case 0 :
- szDest[i] = ((( szData[t]-CH_START ) & 0x3f ) << 2 ) +
- ((( szData[t+1]-CH_START ) & 0x30 ) >> 4 );
+ szDest[i] = (((szData[t] - CH_START) & 0x3f) << 2) +
+ (((szData[t+1] - CH_START) & 0x30) >> 4);
break;
case 1 :
- szDest[i] = ((( szData[t]-CH_START ) & 0x0f ) << 4 ) +
- ((( szData[t+1]-CH_START ) & 0x3c ) >> 2 );
+ szDest[i] = (((szData[t] - CH_START) & 0x0f) << 4) +
+ (((szData[t+1] - CH_START) & 0x3c) >> 2);
break;
case 2 :
- szDest[i] = ((( szData[t]-CH_START ) & 0x03 ) << 6 ) +
- (( szData[t+1]-CH_START ) & 0x3f );
+ szDest[i] = (((szData[t] - CH_START) & 0x03) << 6) +
+ ((szData[t+1] - CH_START) & 0x3f);
t++;
break;
}
- szDest[i] ^= ( bits + i ) ;
+ szDest[i] ^= (bits + i);
}
- return( i ) ;
+ return(i) ;
}
/*============================================================================*/
--
1.7.10.4
next prev parent reply other threads:[~2012-11-30 17:00 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-30 16:58 [PATCH 01/32] staging: wlags49_h2: ap_h2: corrects a pointer styling issue Johan Meiring
2012-11-30 16:58 ` [PATCH 02/32] staging: wlags49_h2: ap_h25: corrects tabs/spaces syling issues Johan Meiring
2012-11-30 16:58 ` [PATCH 03/32] staging: wlags49_h2: ap_h25: corrects parentheses styling issue Johan Meiring
2012-11-30 16:58 ` [PATCH 04/32] staging: wlags49_h2: ap_h25: corrects malformed #include warning Johan Meiring
2012-11-30 16:58 ` [PATCH 05/32] staging: wlags49_h2: ap_h25: corrects casting styling issue Johan Meiring
2012-11-30 16:58 ` [PATCH 06/32] staging: wlags49_h2: ap_h25: corrects incorrect use of // comments Johan Meiring
2012-11-30 16:58 ` [PATCH 07/32] staging: wlags49_h2: wl_enc: converts indentation spaces to tabs Johan Meiring
2012-11-30 16:58 ` Johan Meiring [this message]
2012-11-30 16:58 ` [PATCH 09/32] staging: wlags49_h2: wl_enc: corrects spacing around colons Johan Meiring
2012-11-30 16:58 ` [PATCH 10/32] staging: wlags49_h2: wl_enc: fixes incorrect use of return Johan Meiring
2012-11-30 16:58 ` [PATCH 11/32] staging: wlags49_h2: wl_priv.h: fixes spacing around parentheses Johan Meiring
2012-11-30 16:58 ` [PATCH 12/32] staging: wlags49_h2: wl_priv.h: converts C99 // comments Johan Meiring
2012-11-30 16:58 ` [PATCH 13/32] staging: wlags49_h2: wl_priv.h: fixes instances of 80+ char lines Johan Meiring
2012-11-30 16:58 ` [PATCH 14/32] staging: wlags49_h2: wl_netdev.h: converts C99 // comments Johan Meiring
2012-11-30 16:58 ` [PATCH 15/32] staging: wlags49_h2: wl_netdev.h: sorts out spacing issues Johan Meiring
2012-11-30 16:58 ` [PATCH 16/32] staging: wlags49_h2: sta_h2: fixes spaces-before-tabs problems Johan Meiring
2012-11-30 16:58 ` [PATCH 17/32] staging: wlags49_h2: sta_h2: fixes malformed #include filename Johan Meiring
2012-11-30 16:58 ` [PATCH 18/32] staging: wlags49_h2: sta_h2: fixes spaces around parentheses Johan Meiring
2012-11-30 16:58 ` [PATCH 19/32] staging: wlags49_h2: sta_h2: fixes casting style issue Johan Meiring
2012-11-30 16:58 ` [PATCH 20/32] staging: wlags49_h2: sta_h2: corrects C99 // comments Johan Meiring
2012-11-30 16:58 ` [PATCH 21/32] staging: wlags49_h2: wl_profile.h: fixes spacing around parentheses Johan Meiring
2012-11-30 16:58 ` [PATCH 22/32] staging: wlags49_h2: wl_profile.h: fixes C99 // comment Johan Meiring
2012-11-30 16:58 ` [PATCH 23/32] staging: wlags49_h2: wl_priv: fixes spacing around parentheses Johan Meiring
2012-11-30 16:58 ` [PATCH 24/32] staging: wlags49_h2: wl_priv: fixes parentheses styling issues Johan Meiring
2012-11-30 16:58 ` [PATCH 25/32] staging: wlags49_h2: wl_priv: fixes incorrect #include Johan Meiring
2012-11-30 16:58 ` [PATCH 26/32] staging: wlags49_h2: wl_priv: fixes case statement styling issues Johan Meiring
2012-11-30 16:58 ` [PATCH 27/32] staging: wlags49_h2: wl_priv: fixes brace placement Johan Meiring
2012-11-30 16:58 ` [PATCH 28/32] staging: wlags49_h2: wl_priv: converts indentation to tabs Johan Meiring
2012-11-30 16:58 ` [PATCH 29/32] staging: wlags49_h2: wl_priv: converts C99 // comments Johan Meiring
2012-11-30 16:58 ` [PATCH 30/32] staging: wlags49_h2: wl_util: fixes spacing around parentheses Johan Meiring
2012-11-30 16:58 ` [PATCH 31/32] staging: wlags49_h2: wl_util: converts C99 // comment Johan Meiring
2012-11-30 16:58 ` [PATCH 32/32] staging: wlags49_h2: wl_util: corrects asterisk placement Johan Meiring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1354294737-5735-8-git-send-email-johanmeiring@gmail.com \
--to=johanmeiring@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=jkosina@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=pe1dnn@amsat.org \
--cc=standby24x7@gmail.com \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome