Add parentheses around use of zerouuid macro (#371)

Otherwise the preprocessor may gobble up the commas in mistake of extra parameters when it is passed to uuidcmpzero.
cppcheck v1.86 was complaining about this line.
This commit is contained in:
Jacob Perron 2019-01-09 15:50:15 -08:00 committed by GitHub
parent 65bf34b3b7
commit ecc3cb5377
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -57,7 +57,7 @@ extern "C"
#define UUID_SIZE 16 #define UUID_SIZE 16
#define uuidcmp(uuid0, uuid1) (0 == memcmp(uuid0, uuid1, UUID_SIZE)) #define uuidcmp(uuid0, uuid1) (0 == memcmp(uuid0, uuid1, UUID_SIZE))
#define zerouuid (uint8_t[UUID_SIZE]) {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} #define zerouuid (uint8_t[UUID_SIZE]) {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
#define uuidcmpzero(uuid) uuidcmp(uuid, zerouuid) #define uuidcmpzero(uuid) uuidcmp(uuid, (zerouuid))
// Forward declare // Forward declare
typedef struct rcl_action_server_t rcl_action_server_t; typedef struct rcl_action_server_t rcl_action_server_t;