diff --git a/src/dump.c b/src/dump.c index 28ff692..25654b6 100644 --- a/src/dump.c +++ b/src/dump.c @@ -26,7 +26,7 @@ #define MAX_INTEGER_STR_LENGTH 25 #define MAX_REAL_STR_LENGTH 25 -#define FLAGS_TO_INDENT(f) ((f)&0x1F) +#define FLAGS_TO_INDENT(f) ((f) & 0x1F) #define FLAGS_TO_PRECISION(f) (((f) >> 11) & 0x1F) struct buffer { diff --git a/src/jansson.h b/src/jansson.h index e9ff8e1..eaf53bd 100644 --- a/src/jansson.h +++ b/src/jansson.h @@ -379,14 +379,14 @@ json_t *json_load_callback(json_load_callback_t callback, void *data, size_t fla /* encoding */ #define JSON_MAX_INDENT 0x1F -#define JSON_INDENT(n) ((n)&JSON_MAX_INDENT) +#define JSON_INDENT(n) ((n) & JSON_MAX_INDENT) #define JSON_COMPACT 0x20 #define JSON_ENSURE_ASCII 0x40 #define JSON_SORT_KEYS 0x80 #define JSON_PRESERVE_ORDER 0x100 #define JSON_ENCODE_ANY 0x200 #define JSON_ESCAPE_SLASH 0x400 -#define JSON_REAL_PRECISION(n) (((n)&0x1F) << 11) +#define JSON_REAL_PRECISION(n) (((n) & 0x1F) << 11) #define JSON_EMBED 0x10000 typedef int (*json_dump_callback_t)(const char *buffer, size_t size, void *data); diff --git a/src/strbuffer.c b/src/strbuffer.c index d9bcd43..1d82cba 100644 --- a/src/strbuffer.c +++ b/src/strbuffer.c @@ -16,7 +16,7 @@ #define STRBUFFER_MIN_SIZE 16 #define STRBUFFER_FACTOR 2 -#define STRBUFFER_SIZE_MAX ((size_t)-1) +#define STRBUFFER_SIZE_MAX ((size_t)(-1)) int strbuffer_init(strbuffer_t *strbuff) { strbuff->size = STRBUFFER_MIN_SIZE;