mirror of
https://github.com/apache/nuttx.git
synced 2026-05-19 20:06:24 +08:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user