From b19b08d7490e0e2d7d693b1df0b117575cb79d78 Mon Sep 17 00:00:00 2001 From: Lagrang3 Date: Mon, 15 Jan 2024 10:51:09 +0100 Subject: [PATCH] fix CI test: uninitialized variable --- plugins/renepay/mcf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/renepay/mcf.c b/plugins/renepay/mcf.c index 6ab7a8767e3f..baf1332dfba5 100644 --- a/plugins/renepay/mcf.c +++ b/plugins/renepay/mcf.c @@ -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;