| 1867 | } |
| 1868 | |
| 1869 | static 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 | |
| 1888 | CJSON_PUBLIC(cJSON *) cJSON_GetArrayItem(const cJSON *array, int index) |
| 1889 | { |
no outgoing calls
no test coverage detected