[PSDK]
authorThomas Faber <thomas.faber@reactos.org>
Mon, 30 Jan 2017 13:33:46 +0000 (13:33 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Mon, 30 Jan 2017 13:33:46 +0000 (13:33 +0000)
- Remove incorrect bit masking from IsRecognizedPartition & IsContainerPartition. CID 1341188.

svn path=/trunk/; revision=73634

reactos/sdk/include/psdk/winioctl.h

index 3297850..23249ce 100644 (file)
@@ -592,18 +592,18 @@ typedef struct {
     ((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_FAT32))||\
     ((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_FAT32_XINT13))||\
     ((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_XINT13))||\
     ((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_FAT32))||\
     ((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_FAT32_XINT13))||\
     ((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_XINT13))||\
-    ((t&~PARTITION_NTFT)==PARTITION_FAT_12)||\
-    ((t&~PARTITION_NTFT)==PARTITION_FAT_16)||\
-    ((t&~PARTITION_NTFT)==PARTITION_IFS)||\
-    ((t&~PARTITION_NTFT)==PARTITION_HUGE)||\
-    ((t&~PARTITION_NTFT)==PARTITION_FAT32)||\
-    ((t&~PARTITION_NTFT)==PARTITION_FAT32_XINT13)||\
-    ((t&~PARTITION_NTFT)==PARTITION_XINT13)||\
-    ((t&~PARTITION_NTFT)==PARTITION_LINUX)||\
-    ((t&~PARTITION_NTFT)==PARTITION_OLD_LINUX)||\
-    ((t&~PARTITION_NTFT)==PARTITION_FREEBSD)||\
-    ((t&~PARTITION_NTFT)==PARTITION_OPENBSD)||\
-    ((t&~PARTITION_NTFT)==PARTITION_NETBSD))
+    ((t)==PARTITION_FAT_12)||\
+    ((t)==PARTITION_FAT_16)||\
+    ((t)==PARTITION_IFS)||\
+    ((t)==PARTITION_HUGE)||\
+    ((t)==PARTITION_FAT32)||\
+    ((t)==PARTITION_FAT32_XINT13)||\
+    ((t)==PARTITION_XINT13)||\
+    ((t)==PARTITION_LINUX)||\
+    ((t)==PARTITION_OLD_LINUX)||\
+    ((t)==PARTITION_FREEBSD)||\
+    ((t)==PARTITION_OPENBSD)||\
+    ((t)==PARTITION_NETBSD))
 #else
 #define IsRecognizedPartition(t)\
   (((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_FAT_12))||\
 #else
 #define IsRecognizedPartition(t)\
   (((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_FAT_12))||\
@@ -613,19 +613,19 @@ typedef struct {
     ((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_FAT32))||\
     ((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_FAT32_XINT13))||\
     ((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_XINT13))||\
     ((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_FAT32))||\
     ((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_FAT32_XINT13))||\
     ((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_XINT13))||\
-    ((t&~PARTITION_NTFT)==PARTITION_FAT_12)||\
-    ((t&~PARTITION_NTFT)==PARTITION_FAT_16)||\
-    ((t&~PARTITION_NTFT)==PARTITION_IFS)||\
-    ((t&~PARTITION_NTFT)==PARTITION_HUGE)||\
-    ((t&~PARTITION_NTFT)==PARTITION_FAT32)||\
-    ((t&~PARTITION_NTFT)==PARTITION_FAT32_XINT13)||\
-    ((t&~PARTITION_NTFT)==PARTITION_XINT13))
+    ((t)==PARTITION_FAT_12)||\
+    ((t)==PARTITION_FAT_16)||\
+    ((t)==PARTITION_IFS)||\
+    ((t)==PARTITION_HUGE)||\
+    ((t)==PARTITION_FAT32)||\
+    ((t)==PARTITION_FAT32_XINT13)||\
+    ((t)==PARTITION_XINT13))
 #endif
 #define IsContainerPartition(t)\
   (((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_EXTENDED))||\
     ((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_XINT13_EXTENDED))||\
 #endif
 #define IsContainerPartition(t)\
   (((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_EXTENDED))||\
     ((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_XINT13_EXTENDED))||\
-    ((t&~PARTITION_NTFT)==PARTITION_EXTENDED)||\
-    ((t&~PARTITION_NTFT)==PARTITION_XINT13_EXTENDED))
+    ((t)==PARTITION_EXTENDED)||\
+    ((t)==PARTITION_XINT13_EXTENDED))
 
 #ifdef _MSC_VER
 #pragma warning(pop)
 
 #ifdef _MSC_VER
 #pragma warning(pop)