mirror of
https://github.com/DaveGamble/cJSON.git
synced 2023-08-10 21:13:26 +03:00
reformatting: cJSONUtils_GeneratePatch
This commit is contained in:
parent
e8a67f0e4b
commit
d6a6abeca0
@ -493,8 +493,14 @@ static void cJSONUtils_GeneratePatch(cJSON *patches,const char *op,const char *p
|
||||
cJSON_AddItemToObject(patch, "path", cJSON_CreateString(newpath));
|
||||
free(newpath);
|
||||
}
|
||||
else cJSON_AddItemToObject(patch,"path",cJSON_CreateString(path));
|
||||
if (val) cJSON_AddItemToObject(patch,"value",cJSON_Duplicate(val,1));
|
||||
else
|
||||
{
|
||||
cJSON_AddItemToObject(patch, "path", cJSON_CreateString(path));
|
||||
}
|
||||
if (val)
|
||||
{
|
||||
cJSON_AddItemToObject(patch, "value", cJSON_Duplicate(val, 1));
|
||||
}
|
||||
cJSON_AddItemToArray(patches, patch);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user