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

Function get_array_item

cpworker/src/cJSON/cJSON.c:1869–1886  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1867}
1868
1869static cJSON* get_array_item(const cJSON *array, size_t index)
1870{
1871 cJSON *current_child = NULL;
1872
1873 if (array == NULL)
1874 {
1875 return NULL;
1876 }
1877
1878 current_child = array->child;
1879 while ((current_child != NULL) && (index > 0))
1880 {
1881 index--;
1882 current_child = current_child->next;
1883 }
1884
1885 return current_child;
1886}
1887
1888CJSON_PUBLIC(cJSON *) cJSON_GetArrayItem(const cJSON *array, int index)
1889{

Callers 4

cJSON_GetArrayItemFunction · 0.70
cJSON_InsertItemInArrayFunction · 0.70
cJSON_ReplaceItemInArrayFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected