Commit 95157c2
refactor: improve code quality in aligned allocation
- Simplify wasm_runtime_aligned_alloc_internal control flow using guard clause
- Remove redundant wasm_runtime_init() calls in tests (wasm_runtime_full_init handles it)
No functional changes, improves code readability and follows existing patterns.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent 3aedbba commit 95157c2
File tree
2 files changed
+4
-10
lines changed- core/iwasm/common
- tests/unit/mem-alloc
2 files changed
+4
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1038 | 1038 | | |
1039 | 1039 | | |
1040 | 1040 | | |
1041 | | - | |
1042 | | - | |
1043 | | - | |
1044 | | - | |
| 1041 | + | |
| 1042 | + | |
1045 | 1043 | | |
1046 | 1044 | | |
1047 | 1045 | | |
1048 | 1046 | | |
| 1047 | + | |
| 1048 | + | |
1049 | 1049 | | |
1050 | 1050 | | |
1051 | 1051 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
381 | | - | |
382 | 381 | | |
383 | 382 | | |
384 | 383 | | |
| |||
405 | 404 | | |
406 | 405 | | |
407 | 406 | | |
408 | | - | |
409 | 407 | | |
410 | 408 | | |
411 | 409 | | |
| |||
428 | 426 | | |
429 | 427 | | |
430 | 428 | | |
431 | | - | |
432 | 429 | | |
433 | 430 | | |
434 | 431 | | |
| |||
449 | 446 | | |
450 | 447 | | |
451 | 448 | | |
452 | | - | |
453 | 449 | | |
454 | 450 | | |
455 | 451 | | |
| |||
471 | 467 | | |
472 | 468 | | |
473 | 469 | | |
474 | | - | |
475 | 470 | | |
476 | 471 | | |
477 | 472 | | |
| |||
502 | 497 | | |
503 | 498 | | |
504 | 499 | | |
505 | | - | |
506 | 500 | | |
507 | 501 | | |
508 | 502 | | |
| |||
0 commit comments