Explorar el Código

fix code and comment typo (#4802)

TianlongLiang hace 2 semanas
padre
commit
d58586a927

+ 1 - 1
core/iwasm/aot/aot_loader.c

@@ -982,7 +982,7 @@ destroy_init_expr(InitializerExpression *expr)
 #endif
 
 #if WASM_ENABLE_EXTENDED_CONST_EXPR != 0
-    // free left expr and right expr for binary oprand
+    /* free left expr and right expr for binary operand */
     if (!is_expr_binary_op(expr->init_expr_type)) {
         return;
     }

+ 1 - 1
core/iwasm/interpreter/wasm_loader.c

@@ -701,7 +701,7 @@ destroy_init_expr(WASMModule *module, InitializerExpression *expr)
 #endif
 
 #if WASM_ENABLE_EXTENDED_CONST_EXPR != 0
-    // free left expr and right exprs for binary oprand
+    /* free left expr and right exprs for binary operand */
     if (!is_expr_binary_op(expr->init_expr_type)) {
         return;
     }

+ 2 - 2
core/iwasm/interpreter/wasm_mini_loader.c

@@ -375,8 +375,8 @@ destroy_const_expr_stack(ConstExprContext *ctx, bool free_exprs)
 static void
 destroy_init_expr(InitializerExpression *expr)
 {
-    // free left expr and right exprs for binary oprand
-    if (is_expr_binary_op(expr->init_expr_type)) {
+    /* free left expr and right exprs for binary operand */
+    if (!is_expr_binary_op(expr->init_expr_type)) {
         return;
     }
     if (expr->u.binary.l_expr) {