| 1737 | mctx->state_log_top = next_state_log_idx; |
| 1738 | } |
| 1739 | return REG_NOERROR; |
| 1740 | } |
| 1741 | |
| 1742 | static reg_errcode_t |
| 1743 | internal_function |
| 1744 | merge_state_array (const re_dfa_t *dfa, re_dfastate_t **dst, |
| 1745 | re_dfastate_t **src, int num) |
| 1746 | { |
| 1747 | int st_idx; |
| 1748 | reg_errcode_t err; |
| 1749 | for (st_idx = 0; st_idx < num; ++st_idx) |
| 1750 | { |
| 1751 | if (dst[st_idx] == NULL) |
| 1752 | dst[st_idx] = src[st_idx]; |
| 1753 | else if (src[st_idx] != NULL) |
| 1754 | { |
| 1755 | re_node_set merged_set; |
| 1756 | err = re_node_set_init_union (&merged_set, &dst[st_idx]->nodes, |
| 1757 | &src[st_idx]->nodes); |
| 1758 | if (BE (err != REG_NOERROR, 0)) |
| 1759 | return err; |
| 1760 | dst[st_idx] = re_acquire_state (&err, dfa, &merged_set); |
| 1761 | re_node_set_free (&merged_set); |
| 1762 | if (BE (err != REG_NOERROR, 0)) |
| 1763 | return err; |
| 1764 | } |
| 1765 | } |
| 1766 | return REG_NOERROR; |
| 1767 | } |
no test coverage detected