| 1745 | } |
| 1746 | |
| 1747 | static cJSON* get_array_item(const cJSON *array, size_t index) |
| 1748 | { |
| 1749 | cJSON *current_child = NULL; |
| 1750 | |
| 1751 | if (array == NULL) |
| 1752 | { |
| 1753 | return NULL; |
| 1754 | } |
| 1755 | |
| 1756 | current_child = array->child; |
| 1757 | while ((current_child != NULL) && (index > 0)) |
| 1758 | { |
| 1759 | index--; |
| 1760 | current_child = current_child->next; |
| 1761 | } |
| 1762 | |
| 1763 | return current_child; |
| 1764 | } |
| 1765 | |
| 1766 | CJSON_PUBLIC(cJSON *) cJSON_GetArrayItem(const cJSON *array, int index) |
| 1767 | { |
no outgoing calls
no test coverage detected