| 1843 | } |
| 1844 | |
| 1845 | static cJSON* get_array_item(const cJSON *array, size_t index) |
| 1846 | { |
| 1847 | cJSON *current_child = NULL; |
| 1848 | |
| 1849 | if (array == NULL) |
| 1850 | { |
| 1851 | return NULL; |
| 1852 | } |
| 1853 | |
| 1854 | current_child = array->child; |
| 1855 | while ((current_child != NULL) && (index > 0)) |
| 1856 | { |
| 1857 | index--; |
| 1858 | current_child = current_child->next; |
| 1859 | } |
| 1860 | |
| 1861 | return current_child; |
| 1862 | } |
| 1863 | |
| 1864 | CJSON_PUBLIC(cJSON *) cJSON_GetArrayItem(const cJSON *array, int index) |
| 1865 | { |
no outgoing calls
no test coverage detected