diff --git a/musl_template.gni b/musl_template.gni index 912db5ece127b859f0f4bb9f437a622e08775365..41863ae05d682402d36b747f26b9f4d0a71c7d77 100644 --- a/musl_template.gni +++ b/musl_template.gni @@ -730,14 +730,14 @@ template("musl_libs") { "//build/config/compiler:compiler", ":soft_hook", ] - } - cflags = [ - "-mllvm", - "--instcombine-max-iterations=0", - "-ffp-contract=fast", - "-O3", - ] + cflags = [ + "-mllvm", + "--instcombine-max-iterations=0", + "-ffp-contract=fast", + "-O3", + ] + } source_set("soft_musl_jemalloc") { sources = [ "./porting/linux/user/src/malloc/jemalloc/jemalloc.c" ] diff --git a/porting/linux/user/src/hook/malloc_common.c b/porting/linux/user/src/hook/malloc_common.c index fc870f4eef5588a1d10253cc079361aafaa43354..39fb221526f09d171ebf787902b03e0bb992051e 100644 --- a/porting/linux/user/src/hook/malloc_common.c +++ b/porting/linux/user/src/hook/malloc_common.c @@ -18,7 +18,7 @@ void* malloc(size_t bytes) if (!__get_global_hook_flag()) { return MuslFunc(malloc)(bytes); } - else if (!__get_hook_flag()) { + if (!__get_hook_flag()) { return MuslFunc(malloc)(bytes); } return dispatch_table->malloc(bytes); @@ -39,7 +39,7 @@ void free(void* mem) MuslFunc(free)(mem); return; } - else if (!__get_hook_flag()) { + if (!__get_hook_flag()) { MuslFunc(free)(mem); return; }