From 3df1bb93678bf42b72ff4f4f1e1517c7c6e06c39 Mon Sep 17 00:00:00 2001 From: Enderson Maia Date: Thu, 24 Oct 2024 12:00:50 -0300 Subject: [PATCH] fixup! feat: remove cpp-low-level template Co-authored-by: Marcelo Politzer <251334+mpolitzer@users.noreply.github.com> --- cpp-low-level/dapp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cpp-low-level/dapp.c b/cpp-low-level/dapp.c index 769e09a..b42d0b4 100644 --- a/cpp-low-level/dapp.c +++ b/cpp-low-level/dapp.c @@ -24,8 +24,8 @@ #include "libcmt/rollup.h" -static int finish_request(cmt_rollup_t *me, cmt_rollup_finish_t *finish, bool accept) { - finish->accept_previous_request = accept; +static int finish_request(cmt_rollup_t *me, cmt_rollup_finish_t *finish) { + finish->accept_previous_request = true; return cmt_rollup_finish(me, finish); } @@ -66,12 +66,12 @@ int main() { cmt_rollup_t rollup; uint64_t advance_index = 0; - if (cmt_rollup_init(&rollup)) + if (cmt_rollup_init(&rollup) != 0) return EXIT_FAILURE; /* Accept the initial request */ cmt_rollup_finish_t finish; - if (finish_request(&rollup, &finish, true) != 0) { + if (finish_request(&rollup, &finish) != 0) { exit(1); } @@ -80,12 +80,12 @@ int main() { if (handle_request(&rollup, &finish, &advance_index) != 0) { break; } - if (finish_request(&rollup, &finish, true)) { + if (finish_request(&rollup, &finish) != 0) { break; } } cmt_rollup_fini(&rollup); fprintf(stderr, "Exiting...\n"); - return 0; + return 1; }