From 92afac2a0ca640f19d39da6e7e82e1acb93e2024 Mon Sep 17 00:00:00 2001 From: Alice Frosi Date: Wed, 10 May 2023 11:06:12 +0200 Subject: Refactoring of gluten_read/write Refactor includes: - use static inline instead of macro - return -1 if there is an error and don't exit - eval return 0 or -1 - adjust code and tests --- operations.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'operations.h') diff --git a/operations.h b/operations.h index 011369a..ccc42c2 100644 --- a/operations.h +++ b/operations.h @@ -21,7 +21,7 @@ if (res == 0) \ (op)++; \ else if (res == -1) \ - (op) = NULL; \ + return -1; \ else \ (op) += res; \ } while (0); \ @@ -35,7 +35,7 @@ struct arg_clone { }; int do_call(struct arg_clone *c); -void eval(struct gluten *g, struct op *ops, const struct seccomp_notif *req, +int eval(struct gluten *g, struct op *ops, const struct seccomp_notif *req, int notifier); int op_call(const struct seccomp_notif *req, int notifier, struct gluten *g, struct op_call *op); -- cgit v1.2.3