Skip to content

Commit acaa993

Browse files
committed
fix: remove unnecessary else clause in instruction limit checks for improved clarity
1 parent 2935c68 commit acaa993

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

core/iwasm/interpreter/wasm_interp_classic.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1574,7 +1574,7 @@ get_global_addr(uint8 *global_data, WASMGlobalInstance *global)
15741574
wasm_set_exception(module, "instruction limit exceeded"); \
15751575
goto got_exception; \
15761576
} \
1577-
else if (instructions_left > 0) \
1577+
if (instructions_left > 0) \
15781578
instructions_left--;
15791579
#else
15801580
#define CHECK_INSTRUCTION_LIMIT() (void)0

core/iwasm/interpreter/wasm_interp_fast.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ typedef float64 CellType_F64;
107107
wasm_set_exception(module, "instruction limit exceeded"); \
108108
goto got_exception; \
109109
} \
110-
else if (instructions_left > 0) \
110+
if (instructions_left > 0) \
111111
instructions_left--;
112112

113113
#else

0 commit comments

Comments
 (0)