Description: Stringent conditional clauses.
 A handful conditionals use a bit-OR testing, where an inclusive OR
 is the proper mechanism.
Author: Mats Erik Andersson <debian@gisladisker.se>
Forwarded: no
Last-Update: 2010-07-21
--- twofish-0.3.orig/twofish.c	2002-09-28 06:15:46.000000000 +0200
+++ twofish-0.3/twofish.c	2010-07-21 16:15:33.000000000 +0200
@@ -357,7 +357,7 @@
  * This default definition of SWAP works, but on many platforms there is a 
  * more efficient implementation. 
  */
-#define BSWAP(x) (ROL32((x),8)&0x00ff00ff | ROR32((x),8) & 0xff00ff00)
+#define BSWAP(x) ((ROL32((x),8) & 0x00ff00ff) | (ROR32((x),8) & 0xff00ff00))
 
 
 /*
@@ -495,11 +495,11 @@ static void test_platform()
      * The first check in each case is to make sure the size is correct.
      * The second check is to ensure that it is an unsigned type.
      */
-    if( (UInt32)((UInt32)1 << 31) == 0 | (UInt32)-1 < 0 ) 
+    if( ((UInt32) ((UInt32)1 << 31) == 0) || ((UInt32)-1 < 0) ) 
         {
         Twofish_fatal( "Twofish code: Twofish_UInt32 type not suitable" );
         }
-    if( sizeof( Byte ) != 1 | (Byte)-1 < 0 ) 
+    if( (sizeof( Byte ) != 1) || ((Byte)-1 < 0) ) 
         {
         Twofish_fatal( "Twofish code: Twofish_Byte type not suitable" );
         }
@@ -567,7 +567,7 @@ static void test_platform()
         }
 
     /* Test the BSWAP macro */
-    if( BSWAP(C) != 0x12345678UL )
+    if( (BSWAP(C)) != 0x12345678UL )
         {
         /*
          * The BSWAP macro should always work, even if you are not using it.
@@ -577,7 +577,7 @@ static void test_platform()
         }
 
     /* And we can test the b<i> macros which use SELECT_BYTE. */
-    if( b0(C)!=0x12 | b1(C) != 0x34 | b2(C) != 0x56 | b3(C) != 0x78 )
+    if( (b0(C)!=0x12) || (b1(C) != 0x34) || (b2(C) != 0x56) || (b3(C) != 0x78) )
         {
         /*
          * There are many reasons why this could fail.
