Skip to content

Commit

Permalink
fix CI test: uninitialized variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Lagrang3 authored and rustyrussell committed Jan 22, 2024
1 parent 020a03f commit b19b08d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/renepay/mcf.c
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,6 @@ static bool find_optimal_path(const tal_t *ctx, struct dijkstra *dijkstra,
struct arc *prev, char **fail)
{
tal_t *this_ctx = tal(ctx,tal_t);

bool target_found = false;

bitmap *visited = tal_arrz(this_ctx, bitmap,
Expand Down Expand Up @@ -1039,6 +1038,9 @@ static bool find_optimal_path(const tal_t *ctx, struct dijkstra *dijkstra,
}
}

if (!target_found && fail)
*fail = tal_fmt(ctx, "no route to destination");

finish:
tal_free(this_ctx);
return target_found;
Expand Down

0 comments on commit b19b08d

Please sign in to comment.