Skip to content

Commit

Permalink
fixup! feat: remove cpp-low-level template
Browse files Browse the repository at this point in the history
Co-authored-by: Marcelo Politzer <[email protected]>
  • Loading branch information
endersonmaia and mpolitzer committed Oct 24, 2024
1 parent 0cba427 commit 3df1bb9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cpp-low-level/dapp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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);
}

Expand All @@ -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;
}

0 comments on commit 3df1bb9

Please sign in to comment.