[linux-lvm] [PATCH 5/7] thin-provisioning-tools: fix binary constants for g++-4.2 and older

Mikulas Patocka mpatocka at redhat.com
Tue Jan 13 19:50:04 UTC 2015


g++-4.2 and older doesn't accept binary constants.

Signed-off-by: Mikulas Patocka <mpatocka at redhat.com>

---
 persistent-data/space-maps/disk.cc |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: thin-provisioning-tools/persistent-data/space-maps/disk.cc
===================================================================
--- thin-provisioning-tools.orig/persistent-data/space-maps/disk.cc	2014-11-08 00:38:27.000000000 +0100
+++ thin-provisioning-tools/persistent-data/space-maps/disk.cc	2014-11-08 00:38:51.000000000 +0100
@@ -112,7 +112,7 @@ namespace {
 			ref_t b1 = test_bit_le(bits, b * 2);
 			ref_t b2 = test_bit_le(bits, b * 2 + 1);
 			ref_t result = b2 ? 1 : 0;
-			result |= b1 ? 0b10 : 0;
+			result |= b1 ? 2 : 0;
 			return result;
 		}
 
@@ -165,7 +165,7 @@ namespace {
 				ref_t b1 = test_bit_le(bits, b * 2);
 				ref_t b2 = test_bit_le(bits, b * 2 + 1);
 				ref_t result = b2 ? 1 : 0;
-				result |= b1 ? 0b10 : 0;
+				result |= b1 ? 2 : 0;
 				it(offset + b, result);
 			}
 		}




More information about the linux-lvm mailing list