chore: fix return on bad status (#3758)

This commit is contained in:
Vladislav 2024-09-22 01:36:39 +03:00 committed by GitHub
parent cce2eb35ed
commit d9f8f2553b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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