fix: simplify instruction limit checks for better readability

This commit is contained in:
Alix ANNERAUD 2025-03-17 22:48:00 +01:00
parent 70af781bde
commit 0df05aff1a
2 changed files with 4 additions and 4 deletions

View File

@ -1575,7 +1575,7 @@ get_global_addr(uint8 *global_data, WASMGlobalInstance *global)
goto got_exception; \
} \
else if (instructions_left > 0) \
instructions_left--; \
instructions_left--;
#else
#define CHECK_INSTRUCTION_LIMIT() (void)0
#endif

View File

@ -107,9 +107,9 @@ typedef float64 CellType_F64;
wasm_set_exception(module_inst, "instruction limit exceeded"); \
goto got_exception; \
} \
else if (instructions_left > 0) { \
instructions_left--; \
} \
else if (instructions_left > 0) \
instructions_left--;
#else
#define CHECK_INSTRUCTION_LIMIT() (void)0
#endif