From 75738f0ac9cde3b1aaebd6d700cb9329a419555e Mon Sep 17 00:00:00 2001 From: Alice Frosi Date: Thu, 31 Aug 2023 15:41:41 +0200 Subject: seitan: small fixes Fixes: - return an error message in do_clone instead of exit - check if the type of context is out-of-bound --- common/util.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'common') diff --git a/common/util.h b/common/util.h index 4b59e77..1367c0d 100644 --- a/common/util.h +++ b/common/util.h @@ -130,4 +130,12 @@ void debug(const char *format, ...); #define BITS_PER_NUM(n) (const_ilog2(n) + 1) #define N_SYSCALL 512 extern const char *syscall_name_str[N_SYSCALL + 1]; + +#define ret_clone_err(c, ...) \ + do { \ + c->err = -1; \ + err(__VA_ARGS__); \ + return -1; \ + } while (0) + #endif /* UTIL_H */ -- cgit v1.2.3