From ad9daedf889de9b7256229f93beef875b4e2e001 Mon Sep 17 00:00:00 2001 From: liyufan Date: Wed, 15 Mar 2023 15:40:42 +0800 Subject: [PATCH] fixed 13036a0b from https://gitee.com/liyufan123/third_party_musl/pulls/850 Fix codecheck for build waring Issue:#I6NCRY Test: Build & Boot devices Signed-off-by: liyufan --- porting/linux/user/src/hook/musl_socket_preinit.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/porting/linux/user/src/hook/musl_socket_preinit.c b/porting/linux/user/src/hook/musl_socket_preinit.c index b0a7f188..af2849e1 100644 --- a/porting/linux/user/src/hook/musl_socket_preinit.c +++ b/porting/linux/user/src/hook/musl_socket_preinit.c @@ -38,7 +38,7 @@ static void clear_socket_function() static void socket_finalize() { ((finalize_func_type)shared_lib_func[FINALIZE_FUNC])(); - __current_dispatch = NULL; + __current_dispatch = 0; __socket_hook_begin_flag = false; // Don't dlclose because hidumper crash } @@ -51,7 +51,7 @@ static bool finish_install_ohos_socket_hooks(const char* options) return false; } - int ret_value = atexit(socket_finalize); + atexit(socket_finalize); return true; } @@ -106,7 +106,7 @@ static void install_ohos_socket_hook() return; } - __current_dispatch = NULL; + __current_dispatch = 0; shared_library_handle = load_socket_hook_shared_library(); if (shared_library_handle == NULL) { return; @@ -116,7 +116,7 @@ static void install_ohos_socket_hook() __ohos_socket_hook_shared_library = (long long)shared_library_handle; __current_dispatch = (long long)(&__musl_libc_socket_dispatch); } else { - __ohos_socket_hook_shared_library = NULL; + __ohos_socket_hook_shared_library = 0; dlclose((void *)shared_library_handle); } } -- GitLab