Skip to content

Commit 3b41e08

Browse files
committed
rename function
1 parent 4951d05 commit 3b41e08

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

include/c_minilib_error.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,9 @@ static inline __attribute__((always_inline)) uint32_t cme_next_idx(void) {
134134
/**
135135
* Create a simple error (no formatting).
136136
*/
137-
static inline __attribute__((always_inline)) cme_error_t cme_error_create(
138-
int code, const char *file, const char *func, int line, const char *msg) {
137+
static inline __attribute__((always_inline)) cme_error_t
138+
cme_error_create(int code, const char *file, const char *func, int line,
139+
const char *msg) {
139140
if (!cme_ringbuf) {
140141
return NULL;
141142
}
@@ -173,8 +174,9 @@ cme_error_create_fmt(int code, const char *file, const char *func, int line,
173174
/**
174175
* Push a backtrace frame onto an existing error.
175176
*/
176-
static inline __attribute__((always_inline)) cme_error_t cme_error_push_symbol(
177-
cme_error_t err, const char *file, const char *func, int line) {
177+
static inline __attribute__((always_inline)) cme_error_t
178+
cme_error_push_frame(cme_error_t err, const char *file, const char *func,
179+
int line) {
178180
#ifdef CME_ENABLE_BACKTRACE
179181
if (err && err->frames_length < CME_STACK_MAX) {
180182
err->frames[err->frames_length++] =
@@ -277,6 +279,6 @@ static inline void cme_error_destroy(cme_error_t err) { (void)err; }
277279
* Propagate an error and add caller frame.
278280
*/
279281
#define cme_return(ERR) \
280-
cme_error_push_symbol((ERR), __FILE__, __func__, __LINE__)
282+
cme_error_push_frame((ERR), __FILE__, __func__, __LINE__)
281283

282284
#endif // C_MINILIB_ERROR_H

0 commit comments

Comments
 (0)