aboutgitcodelistschat:MatrixIRC
path: root/common
diff options
context:
space:
mode:
authorAlice Frosi <afrosi@redhat.com>2023-08-31 15:41:41 +0200
committerAlice Frosi <afrosi@redhat.com>2023-08-31 15:41:41 +0200
commit75738f0ac9cde3b1aaebd6d700cb9329a419555e (patch)
treecc1dd6262bad0c126546b19d7a3465cc89831373 /common
parent143e0d2118f9cd038a9d2f29abfe8179d05e7824 (diff)
downloadseitan-75738f0ac9cde3b1aaebd6d700cb9329a419555e.tar
seitan-75738f0ac9cde3b1aaebd6d700cb9329a419555e.tar.gz
seitan-75738f0ac9cde3b1aaebd6d700cb9329a419555e.tar.bz2
seitan-75738f0ac9cde3b1aaebd6d700cb9329a419555e.tar.lz
seitan-75738f0ac9cde3b1aaebd6d700cb9329a419555e.tar.xz
seitan-75738f0ac9cde3b1aaebd6d700cb9329a419555e.tar.zst
seitan-75738f0ac9cde3b1aaebd6d700cb9329a419555e.zip
seitan: small fixes
Fixes: - return an error message in do_clone instead of exit - check if the type of context is out-of-bound
Diffstat (limited to 'common')
-rw-r--r--common/util.h8
1 files changed, 8 insertions, 0 deletions
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 */