1.1 --- a/fsaccess/ops.c Mon Jan 15 23:44:56 2024 +0100
1.2 +++ b/fsaccess/ops.c Wed Jan 17 00:52:03 2024 +0100
1.3 @@ -52,17 +52,16 @@
1.4
1.5 /* Invocation of operations. */
1.6
1.7 -enum op_results run_operation(const char *operation, int argc, char *argv[])
1.8 +enum op_results run_operation(const char *operation, int argc, char *argv[], int *exitcode)
1.9 {
1.10 struct operation *op;
1.11 - int exitcode;
1.12
1.13 for (op = &operations[0]; op->name != NULL; op++)
1.14 {
1.15 if (!strcmp(operation, op->name))
1.16 {
1.17 - exitcode = op->fn(argc, argv);
1.18 - if (exitcode)
1.19 + *exitcode = op->fn(argc, argv);
1.20 + if (*exitcode)
1.21 return OP_FAILED;
1.22 break;
1.23 }