From f7c62f22d1f77349e634adea3290154a41c0acb6 Mon Sep 17 00:00:00 2001 From: Dengfeng Liu Date: Sun, 10 Nov 2024 18:47:37 +0800 Subject: [PATCH] helper: replace strerrordesc_np with strerror for error handling Signed-off-by: Dengfeng Liu --- src/core/helper.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/core/helper.h b/src/core/helper.h index b3af1ed9..f826f269 100644 --- a/src/core/helper.h +++ b/src/core/helper.h @@ -13,8 +13,6 @@ #include #include -extern const char *strerrordesc_np(int errnum); - #define bf_packed __attribute__((packed)) #define bf_aligned(x) __attribute__((aligned(x))) #define bf_unused __attribute__((unused)) @@ -80,7 +78,7 @@ extern const char *strerrordesc_np(int errnum); * * @param v Error code, can be positive or negative. */ -#define bf_strerror(v) strerrordesc_np(abs(v)) +#define bf_strerror(v) strerror(abs(v)) /** * Swap two values.