aboutgitcodelistschat:MatrixIRC
path: root/operations.h
diff options
context:
space:
mode:
authorAlice Frosi <afrosi@redhat.com>2023-05-10 11:06:12 +0200
committerAlice Frosi <afrosi@redhat.com>2023-05-10 12:18:57 +0200
commit92afac2a0ca640f19d39da6e7e82e1acb93e2024 (patch)
tree52e0acb81db84833b76d36128800b26dab86effa /operations.h
parent0977f0876af186975d3861c53b8431a80a27fa83 (diff)
downloadseitan-92afac2a0ca640f19d39da6e7e82e1acb93e2024.tar
seitan-92afac2a0ca640f19d39da6e7e82e1acb93e2024.tar.gz
seitan-92afac2a0ca640f19d39da6e7e82e1acb93e2024.tar.bz2
seitan-92afac2a0ca640f19d39da6e7e82e1acb93e2024.tar.lz
seitan-92afac2a0ca640f19d39da6e7e82e1acb93e2024.tar.xz
seitan-92afac2a0ca640f19d39da6e7e82e1acb93e2024.tar.zst
seitan-92afac2a0ca640f19d39da6e7e82e1acb93e2024.zip
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
Diffstat (limited to 'operations.h')
-rw-r--r--operations.h4
1 files changed, 2 insertions, 2 deletions
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);