fix CI test: uninitialized variable

This commit is contained in:
Lagrang3 2024-01-15 10:51:09 +01:00 committed by Rusty Russell
parent 020a03fc3b
commit b19b08d749

View File

@ -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,
@ -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;