diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-02 20:55:18 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-02 20:55:18 +0000 |
commit | 78c0815c4118fe24ab78cce2dc48a6232dcd824a (patch) | |
tree | 8512c50df70b8dd80c919e88ade3419207c95956 /protocols/MSN | |
parent | ce816d83a8c75808e0eb06832592bffefe4a8dc4 (diff) |
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MSN')
-rw-r--r-- | protocols/MSN/des.c | 18 | ||||
-rw-r--r-- | protocols/MSN/msn_commands.cpp | 2 | ||||
-rw-r--r-- | protocols/MSN/msn_threads.cpp | 2 |
3 files changed, 11 insertions, 11 deletions
diff --git a/protocols/MSN/des.c b/protocols/MSN/des.c index 12d59914cd..030fb983cd 100644 --- a/protocols/MSN/des.c +++ b/protocols/MSN/des.c @@ -317,9 +317,9 @@ static void des_main_ks( unsigned long SK[32], unsigned char key[8] ) /*
* calculate subkeys
*/
- for( i = 0; i < 16; i++ )
+ for ( i = 0; i < 16; i++ )
{
- if( i < 2 || i == 8 || i == 15 )
+ if ( i < 2 || i == 8 || i == 15 )
{
X = ((X << 1) | (X >> 27)) & 0x0FFFFFFF;
Y = ((Y << 1) | (Y >> 27)) & 0x0FFFFFFF;
@@ -365,7 +365,7 @@ void des_set_key( des_context *ctx, unsigned char key[8] ) des_main_ks( ctx->esk, key );
- for( i = 0; i < 32; i += 2 )
+ for ( i = 0; i < 32; i += 2 )
{
ctx->dsk[i ] = ctx->esk[30 - i];
ctx->dsk[i + 1] = ctx->esk[31 - i];
@@ -431,7 +431,7 @@ void des_cbc_encrypt( des_context *ctx, while( len > 0 )
{
- for( i = 0; i < 8; i++ )
+ for ( i = 0; i < 8; i++ )
output[i] = input[i] ^ iv[i];
des_crypt( ctx->esk, output, output );
@@ -460,7 +460,7 @@ void des_cbc_decrypt( des_context *ctx, memcpy( temp, input, 8 );
des_crypt( ctx->dsk, input, output );
- for( i = 0; i < 8; i++ )
+ for ( i = 0; i < 8; i++ )
output[i] = output[i] ^ iv[i];
memcpy( iv, temp, 8 );
@@ -481,7 +481,7 @@ void des3_set_2keys( des3_context *ctx, unsigned char key[16] ) des_main_ks( ctx->esk , key );
des_main_ks( ctx->dsk + 32, key + 8 );
- for( i = 0; i < 32; i += 2 )
+ for ( i = 0; i < 32; i += 2 )
{
ctx->dsk[i ] = ctx->esk[30 - i];
ctx->dsk[i + 1] = ctx->esk[31 - i];
@@ -508,7 +508,7 @@ void des3_set_3keys( des3_context *ctx, unsigned char key[24] ) des_main_ks( ctx->dsk + 32, key + 8 );
des_main_ks( ctx->esk + 64, key + 16 );
- for( i = 0; i < 32; i += 2 )
+ for ( i = 0; i < 32; i += 2 )
{
ctx->dsk[i ] = ctx->esk[94 - i];
ctx->dsk[i + 1] = ctx->esk[95 - i];
@@ -598,7 +598,7 @@ void des3_cbc_encrypt( des3_context *ctx, while( len > 0 )
{
- for( i = 0; i < 8; i++ )
+ for ( i = 0; i < 8; i++ )
output[i] = input[i] ^ iv[i];
des3_crypt( ctx->esk, output, output );
@@ -627,7 +627,7 @@ void des3_cbc_decrypt( des3_context *ctx, memcpy( temp, input, 8 );
des3_crypt( ctx->dsk, input, output );
- for( i = 0; i < 8; i++ )
+ for ( i = 0; i < 8; i++ )
output[i] = output[i] ^ iv[i];
memcpy( iv, temp, 8 );
diff --git a/protocols/MSN/msn_commands.cpp b/protocols/MSN/msn_commands.cpp index a85ff46fe4..af6494f741 100644 --- a/protocols/MSN/msn_commands.cpp +++ b/protocols/MSN/msn_commands.cpp @@ -278,7 +278,7 @@ void CMsnProto::sttCustomSmiley(const char* msgBody, char* email, char* nick, in unsigned iCount = 0;
bool parseSmiley = true;
- for(;;)
+ for (;;)
{
tok2 = strchr(tok1, '\t');
if (tok2 == NULL) break;
diff --git a/protocols/MSN/msn_threads.cpp b/protocols/MSN/msn_threads.cpp index 4043806b51..f312fcdc01 100644 --- a/protocols/MSN/msn_threads.cpp +++ b/protocols/MSN/msn_threads.cpp @@ -200,7 +200,7 @@ void __cdecl CMsnProto::MSNServerThread(void* arg) }
else
{
- for(;;)
+ for (;;)
{
char* peol = strchr(info->mData, '\r');
if (peol == NULL)
|