libs/libc/regex: remove logically dead code in regcomp.c

This change removes redundant and unreachable checks of `status != REG_OK`
that were reported by static code scanning. Two occurrences were fixed in
`libs/libc/regex/regcomp.c`

Signed-off-by: yukangzhi <yukangzhi@xiaomi.com>
This commit is contained in:
yukangzhi
2025-01-21 12:20:08 +08:00
committed by GUIDINGLI
parent b1fe00fa1e
commit 8cdf58d124
-9
View File
@@ -2290,10 +2290,6 @@ static reg_errcode_t tre_copy_ast(tre_mem_t mem, tre_stack_t *stack,
while (status == REG_OK && tre_stack_num_objects(stack) > bottom)
{
tre_ast_node_t *node;
if (status != REG_OK)
{
break;
}
symbol = (tre_copyast_symbol_t)tre_stack_pop_int(stack);
switch (symbol)
@@ -2463,11 +2459,6 @@ static reg_errcode_t tre_expand_ast(tre_mem_t mem, tre_stack_t *stack,
tre_ast_node_t *node;
tre_expand_ast_symbol_t symbol;
if (status != REG_OK)
{
break;
}
symbol = (tre_expand_ast_symbol_t)tre_stack_pop_int(stack);
node = tre_stack_pop_voidptr(stack);
switch (symbol)