Merge "Fix misc-macro-parentheses warnings." am: 0c0f9228cf am: 4ff367a593
am: 5dc0aa6e41

* commit '5dc0aa6e41fbd961ecefaa3fc6fe4ac720e53bc3':
  Fix misc-macro-parentheses warnings.

Change-Id: I2acf395df99305784d1ada44897b1df26e0f5791
diff --git a/MoveTask.cpp b/MoveTask.cpp
index d416718..a6e5fed 100644
--- a/MoveTask.cpp
+++ b/MoveTask.cpp
@@ -27,7 +27,7 @@
 #include <dirent.h>
 #include <sys/wait.h>
 
-#define CONSTRAIN(amount, low, high) (amount < low ? low : (amount > high ? high : amount))
+#define CONSTRAIN(amount, low, high) ((amount) < (low) ? (low) : ((amount) > (high) ? (high) : (amount)))
 
 using android::base::StringPrintf;
 
diff --git a/VolumeManager.cpp b/VolumeManager.cpp
index 5cc60a1..e1ee96c 100644
--- a/VolumeManager.cpp
+++ b/VolumeManager.cpp
@@ -63,8 +63,8 @@
 
 #define MASS_STORAGE_FILE_PATH  "/sys/class/android_usb/android0/f_mass_storage/lun/file"
 
-#define ROUND_UP_POWER_OF_2(number, po2) (((!!(number & ((1U << po2) - 1))) << po2)\
-                                         + (number & (~((1U << po2) - 1))))
+#define ROUND_UP_POWER_OF_2(number, po2) (((!!((number) & ((1U << (po2)) - 1))) << (po2))\
+                                         + ((number) & (~((1U << (po2)) - 1))))
 
 using android::base::StringPrintf;