Преглед изворни кода

cJSON: cjson_min: Wrap arguments in parentheses

Max Bruckner пре 7 година
родитељ
комит
fd5281bdd8
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      cJSON.c

+ 1 - 1
cJSON.c

@@ -1077,7 +1077,7 @@ CJSON_PUBLIC(cJSON *) cJSON_Parse(const char *value)
     return cJSON_ParseWithOpts(value, 0, 0);
 }
 
-#define cjson_min(a, b) ((a < b) ? a : b)
+#define cjson_min(a, b) (((a) < (b)) ? (a) : (b))
 
 static unsigned char *print(const cJSON * const item, cJSON_bool format, const internal_hooks * const hooks)
 {