Skip to content

Commit

Permalink
helper: replace strerrordesc_np with strerror for error handling
Browse files Browse the repository at this point in the history
Signed-off-by: Dengfeng Liu <[email protected]>
  • Loading branch information
liudf0716 committed Nov 14, 2024
1 parent 809e803 commit f7c62f2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/core/helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
#include <string.h>
#include <unistd.h>

extern const char *strerrordesc_np(int errnum);

#define bf_packed __attribute__((packed))
#define bf_aligned(x) __attribute__((aligned(x)))
#define bf_unused __attribute__((unused))
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit f7c62f2

Please sign in to comment.