MCPcopy Create free account
hub / github.com/Netis/cloud-probe / cJSONUtils_ApplyPatchesCaseSensitive

Function cJSONUtils_ApplyPatchesCaseSensitive

cpworker/src/cJSON/cJSON_Utils.c:1088–1115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1086}
1087
1088CJSON_PUBLIC(int) cJSONUtils_ApplyPatchesCaseSensitive(cJSON *const object, const cJSON *const patches)
1089{
1090 const cJSON *current_patch = NULL;
1091 int status = 0;
1092
1093 if (!cJSON_IsArray(patches))
1094 {
1095 /* malformed patches. */
1096 return 1;
1097 }
1098
1099 if (patches != NULL)
1100 {
1101 current_patch = patches->child;
1102 }
1103
1104 while (current_patch != NULL)
1105 {
1106 status = apply_patch(object, current_patch, true);
1107 if (status != 0)
1108 {
1109 return status;
1110 }
1111 current_patch = current_patch->next;
1112 }
1113
1114 return 0;
1115}
1116
1117static void compose_patch(cJSON *const patches, const unsigned char *const operation, const unsigned char *const path,
1118 const unsigned char *suffix, const cJSON *const value)

Callers

nothing calls this directly

Calls 2

cJSON_IsArrayFunction · 0.85
apply_patchFunction · 0.85

Tested by

no test coverage detected