| 1854 | } |
| 1855 | |
| 1856 | static cJSON* get_array_item(const cJSON *array, size_t index) |
| 1857 | { |
| 1858 | cJSON *current_child = NULL; |
| 1859 | |
| 1860 | if (array == NULL) |
| 1861 | { |
| 1862 | return NULL; |
| 1863 | } |
| 1864 | |
| 1865 | current_child = array->child; |
| 1866 | while ((current_child != NULL) && (index > 0)) |
| 1867 | { |
| 1868 | index--; |
| 1869 | current_child = current_child->next; |
| 1870 | } |
| 1871 | |
| 1872 | return current_child; |
| 1873 | } |
| 1874 | |
| 1875 | CJSON_PUBLIC(cJSON *) cJSON_GetArrayItem(const cJSON *array, int index) |
| 1876 | { |
no outgoing calls
no test coverage detected