diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/debugserver.c | 8 | ||||
-rw-r--r-- | src/mobilebackup.c | 2 | ||||
-rw-r--r-- | src/mobilebackup2.c | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/debugserver.c b/src/debugserver.c index 7dd7f22..39c1bdc 100644 --- a/src/debugserver.c +++ b/src/debugserver.c @@ -239,10 +239,10 @@ static char debugserver_int2hex(int x) return hexchars[x]; } -#define DEBUGSERVER_HEX_ENCODE_FIRST_BYTE(byte) debugserver_int2hex((byte >> 0x4) & 0xf) -#define DEBUGSERVER_HEX_ENCODE_SECOND_BYTE(byte) debugserver_int2hex(byte & 0xf) -#define DEBUGSERVER_HEX_DECODE_FIRST_BYTE(byte) ((byte >> 0x4) & 0xf) -#define DEBUGSERVER_HEX_DECODE_SECOND_BYTE(byte) (byte & 0xf) +#define DEBUGSERVER_HEX_ENCODE_FIRST_BYTE(byte) debugserver_int2hex(((byte) >> 0x4) & 0xf) +#define DEBUGSERVER_HEX_ENCODE_SECOND_BYTE(byte) debugserver_int2hex((byte) & 0xf) +#define DEBUGSERVER_HEX_DECODE_FIRST_BYTE(byte) (((byte) >> 0x4) & 0xf) +#define DEBUGSERVER_HEX_DECODE_SECOND_BYTE(byte) ((byte) & 0xf) static uint32_t debugserver_get_checksum_for_buffer(const char* buffer, uint32_t size) { diff --git a/src/mobilebackup.c b/src/mobilebackup.c index cde96b5..aa29277 100644 --- a/src/mobilebackup.c +++ b/src/mobilebackup.c @@ -34,7 +34,7 @@ #define MBACKUP_VERSION_INT1 100 #define MBACKUP_VERSION_INT2 0 -#define IS_FLAG_SET(x, y) ((x & y) == y) +#define IS_FLAG_SET(x, y) (((x) & (y)) == (y)) /** * Convert an device_link_service_error_t value to an mobilebackup_error_t value. diff --git a/src/mobilebackup2.c b/src/mobilebackup2.c index 6c6556d..f4fde95 100644 --- a/src/mobilebackup2.c +++ b/src/mobilebackup2.c @@ -33,7 +33,7 @@ #define MBACKUP2_VERSION_INT1 400 #define MBACKUP2_VERSION_INT2 0 -#define IS_FLAG_SET(x, y) ((x & y) == y) +#define IS_FLAG_SET(x, y) (((x) & (y)) == (y)) /** * Convert an device_link_service_error_t value to an mobilebackup2_error_t value. |