Push a tree entry, growing the array if needed. */
| 9799 | |
| 9800 | /* Push a tree entry, growing the array if needed. */ |
| 9801 | static void push_tree_entry(cbm_file_tree_entry_t **entries, int *en, int *ecap, |
| 9802 | cbm_file_tree_entry_t e) { |
| 9803 | if (*en >= *ecap) { |
| 9804 | *ecap *= ST_GROWTH; |
| 9805 | *entries = safe_realloc(*entries, *ecap * sizeof(cbm_file_tree_entry_t)); |
| 9806 | } |
| 9807 | (*entries)[(*en)++] = e; |
| 9808 | } |
| 9809 | |
| 9810 | /* Collect tree entries from dir arrays. */ |
| 9811 | static void arch_collect_entries(char **dir_paths, int *dir_child_counts, char ***dir_children, |
no test coverage detected