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