diff options
| author | ruki <[email protected]> | 2025-11-09 21:38:38 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-11-09 21:38:38 +0800 |
| commit | f2f3821a0248b24941566c90e7aabcc0e7d95e77 (patch) | |
| tree | e139715ac4dafd06e95f4018264e69a864316e02 /core/src/xmake/hash | |
| parent | 1b8d7a8ef65e54bfd86d5cafbab9f197974b0c82 (diff) | |
format more code
Diffstat (limited to 'core/src/xmake/hash')
| -rw-r--r-- | core/src/xmake/hash/md5.c | 3 | ||||
| -rw-r--r-- | core/src/xmake/hash/sha.c | 3 | ||||
| -rw-r--r-- | core/src/xmake/hash/xxhash.c | 6 |
3 files changed, 4 insertions, 8 deletions
diff --git a/core/src/xmake/hash/md5.c b/core/src/xmake/hash/md5.c index d07c355e4..6d18b72ba 100644 --- a/core/src/xmake/hash/md5.c +++ b/core/src/xmake/hash/md5.c @@ -83,8 +83,7 @@ tb_int_t xm_hash_md5(lua_State *lua) { if (real > 0) { tb_md5_spak(&md5, data, real); // no data? continue it - } - else if (!real) { + } else if (!real) { // wait real = tb_stream_wait(stream, TB_STREAM_WAIT_READ, tb_stream_timeout(stream)); tb_check_break(real > 0); diff --git a/core/src/xmake/hash/sha.c b/core/src/xmake/hash/sha.c index 4fddb0b83..7ddcab62f 100644 --- a/core/src/xmake/hash/sha.c +++ b/core/src/xmake/hash/sha.c @@ -90,8 +90,7 @@ tb_int_t xm_hash_sha(lua_State *lua) { if (real > 0) { tb_sha_spak(&sha, data, real); // no data? continue it - } - else if (!real) { + } else if (!real) { // wait real = tb_stream_wait(stream, TB_STREAM_WAIT_READ, tb_stream_timeout(stream)); tb_check_break(real > 0); diff --git a/core/src/xmake/hash/xxhash.c b/core/src/xmake/hash/xxhash.c index 035ba4497..a7fe4a985 100644 --- a/core/src/xmake/hash/xxhash.c +++ b/core/src/xmake/hash/xxhash.c @@ -105,8 +105,7 @@ tb_int_t xm_hash_xxhash(lua_State *lua) { // reset xxhash if (mode == 32 || mode == 64) { XM_XXH3_64bits_reset(state); - } - else { + } else { XM_XXH3_128bits_reset(state); } @@ -119,8 +118,7 @@ tb_int_t xm_hash_xxhash(lua_State *lua) { if (real > 0) { if (mode == 32 || mode == 64) { XM_XXH3_64bits_update(state, data, real); - } - else { + } else { XM_XXH3_128bits_update(state, data, real); } } |
