Skip to content

Commit 5d2c03b

Browse files
committed
libexec: inline methods
1 parent b9699e6 commit 5d2c03b

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

source/intercept-library/library/source/Executor.cc

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,25 +34,20 @@ namespace {
3434

3535
constexpr el::log::Logger LOGGER("Executor.cc");
3636

37-
constexpr el::Executor::Result failure(int const error_code) noexcept
38-
{
39-
return el::Executor::Result { -1, error_code };
40-
}
41-
4237
#define CHECK_SESSION(SESSION_) \
4338
do { \
4439
if (!el::session::is_valid(SESSION_)) { \
4540
LOGGER.warning("session is not initialized"); \
46-
return failure(EIO); \
41+
return el::Executor::Result { -1, EIO }; \
4742
} \
4843
} while (false)
4944

50-
#define CHECK_POINTER(PTR_) \
51-
do { \
52-
if (nullptr == (PTR_)) { \
53-
LOGGER.debug("null pointer received"); \
54-
return failure(EFAULT); \
55-
} \
45+
#define CHECK_POINTER(PTR_) \
46+
do { \
47+
if (nullptr == (PTR_)) { \
48+
LOGGER.debug("null pointer received"); \
49+
return el::Executor::Result { -1, EFAULT }; \
50+
} \
5651
} while (false)
5752

5853
// Util class to create command arguments to execute the intercept process.

0 commit comments

Comments
 (0)