diff options
| author | ruki <[email protected]> | 2025-11-09 23:22:44 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-11-09 23:22:44 +0800 |
| commit | 831447a51da0b094e08bb047247bf269a6e6cf71 (patch) | |
| tree | f345e66e3d9882cbb4d49d588c3080d88bc17cd8 /core/src/xmake/libc/malloc.c | |
| parent | bf2da8a3d7f04bf5ffcdce8fd4c334d5421d3494 (diff) | |
format more if-else
Diffstat (limited to 'core/src/xmake/libc/malloc.c')
| -rw-r--r-- | core/src/xmake/libc/malloc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/src/xmake/libc/malloc.c b/core/src/xmake/libc/malloc.c index faaa00e97..6bda4167d 100644 --- a/core/src/xmake/libc/malloc.c +++ b/core/src/xmake/libc/malloc.c @@ -39,8 +39,9 @@ tb_int_t xm_libc_malloc(lua_State *lua) { // do malloc tb_pointer_t data = tb_null; tb_long_t size = (tb_long_t)luaL_checkinteger(lua, 1); - if (size > 0) + if (size > 0) { data = tb_malloc(size); + } lua_pushinteger(lua, (lua_Integer)(tb_long_t)data); return 1; } |
