mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 10:25:47 +02:00
chore: fix return on bad status (#3758)
This commit is contained in:
parent
cce2eb35ed
commit
d9f8f2553b
1 changed files with 6 additions and 5 deletions
|
@ -35,11 +35,12 @@ using facade::kWrongTypeErr;
|
|||
|
||||
#ifndef RETURN_ON_BAD_STATUS
|
||||
|
||||
#define RETURN_ON_BAD_STATUS(x) \
|
||||
do { \
|
||||
if (!(x)) { \
|
||||
return (x).status(); \
|
||||
} \
|
||||
#define RETURN_ON_BAD_STATUS(x) \
|
||||
do { \
|
||||
OpStatus __s = (x).status(); \
|
||||
if (__s != OpStatus::OK) { \
|
||||
return (x).status(); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#endif // RETURN_ON_BAD_STATUS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue