| 1920 | } |
| 1921 | |
| 1922 | static cJSON* get_array_item(const cJSON *array, size_t index) |
| 1923 | { |
| 1924 | cJSON *current_child = NULL; |
| 1925 | |
| 1926 | if (array == NULL) |
| 1927 | { |
| 1928 | return NULL; |
| 1929 | } |
| 1930 | |
| 1931 | current_child = array->child; |
| 1932 | while ((current_child != NULL) && (index > 0)) |
| 1933 | { |
| 1934 | index--; |
| 1935 | current_child = current_child->next; |
| 1936 | } |
| 1937 | |
| 1938 | return current_child; |
| 1939 | } |
| 1940 | |
| 1941 | CJSON_PUBLIC(cJSON *) cJSON_GetArrayItem(const cJSON *array, int index) |
| 1942 | { |
no outgoing calls
no test coverage detected