mirror of
https://github.com/DaveGamble/cJSON.git
synced 2023-08-10 21:13:26 +03:00
is_{nan,infinity}: Wrap macro arguments in parentheses
This commit is contained in:
parent
cb5bd2c97b
commit
d06baf7052
4
cJSON.c
4
cJSON.c
@ -458,8 +458,8 @@ static void update_offset(printbuffer * const buffer)
|
||||
buffer->offset += strlen((const char*)buffer_pointer);
|
||||
}
|
||||
|
||||
#define is_nan(number) (number != number)
|
||||
#define is_infinity(number) (!is_nan(number) && (number * 0) != 0)
|
||||
#define is_nan(number) ((number) != (number))
|
||||
#define is_infinity(number) (!is_nan(number) && ((number) * 0) != 0)
|
||||
|
||||
/* Render the number nicely from the given item into a string. */
|
||||
static cJSON_bool print_number(const cJSON * const item, printbuffer * const output_buffer)
|
||||
|
Loading…
Reference in New Issue
Block a user