https://git.reactos.org/?p=reactos.git;a=commitdiff;h=902b86eecf72c6e45558f…
commit 902b86eecf72c6e45558f62dcaae54e38b850d74
Author: Hervé Poussineau <hpoussin(a)reactos.org>
AuthorDate: Sun Apr 7 19:08:53 2019 +0200
Commit: Hervé Poussineau <hpoussin(a)reactos.org>
CommitDate: Sun Apr 7 19:28:18 2019 +0200
[UDFS] Fix macros to support 'bit' being a complex expression
This is for example used in udf_info/mount.cpp:
UDFSetUsedBits(new_bm, i & ~(d-1), d);
---
drivers/filesystems/udfs/udf_info/udf_info.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/filesystems/udfs/udf_info/udf_info.h
b/drivers/filesystems/udfs/udf_info/udf_info.h
index 2aeeb01d9e..2c971928bb 100644
--- a/drivers/filesystems/udfs/udf_info/udf_info.h
+++ b/drivers/filesystems/udfs/udf_info/udf_info.h
@@ -1184,13 +1184,13 @@ UDFClrBits__(
#define UDFSetBits(arr, bit, bc) \
{uint32 j; \
for(j=0;j<bc;j++) { \
- UDFSetBit(arr, bit+j); \
+ UDFSetBit(arr, (bit)+j); \
}}
#define UDFClrBits(arr, bit, bc) \
{uint32 j; \
for(j=0;j<bc;j++) { \
- UDFClrBit(arr, bit+j); \
+ UDFClrBit(arr, (bit)+j); \
}}
#endif // _X86_