Skip to content

Commit 3c4d4f0

Browse files
authored
Merge pull request #677 from sanpeqf/feat-types
feat types: added ok and error status code macros
2 parents f597038 + 688272e commit 3c4d4f0

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

include/bfdev/bug.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ BFDEV_WARN_MSG( \
4343

4444
#ifndef BFDEV_BUG_ON
4545
# define BFDEV_BUG_ON(condition) ({ \
46-
bfdev_bool __cond = !!(condition); \
46+
bfdev_bool __cond = !!(condition); \
4747
if (bfdev_unlikely(__cond)) \
4848
BFDEV_BUG(); \
4949
bfdev_unlikely(__cond); \
@@ -52,7 +52,7 @@ BFDEV_WARN_MSG( \
5252

5353
#ifndef BFDEV_WARN_ON
5454
# define BFDEV_WARN_ON(condition) ({ \
55-
bfdev_bool __cond = !!(condition); \
55+
bfdev_bool __cond = !!(condition); \
5656
if (bfdev_unlikely(__cond)) \
5757
BFDEV_WARN(); \
5858
bfdev_unlikely(__cond); \

include/bfdev/types.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ typedef int bfdev_state_t;
5252
typedef bfdev_intptr_t bfdev_atomic_t;
5353
typedef bfdev_u64 bfdev_time_t;
5454

55+
#define BFDEV_OK 0
56+
#define BFDEV_ERROR -1
57+
5558
#define BFDEV_EQ 0
5659
#define BFDEV_BT 1
5760
#define BFDEV_LT -1

0 commit comments

Comments
 (0)