Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lightningd/pay.c
Original file line number Diff line number Diff line change
Expand Up @@ -636,8 +636,8 @@ static void json_sendpay_on_resolve(const struct sendpay_result *r,
{
struct command *cmd = (struct command*) vcmd;

struct json_result *data;
const char *msg;
struct json_result *data = NULL;
const char *msg = NULL;
struct routing_failure *fail;

if (r->succeeded)
Expand Down Expand Up @@ -693,6 +693,7 @@ static void json_sendpay_on_resolve(const struct sendpay_result *r,
break;
}

assert(msg);
command_fail_detailed(cmd, r->errorcode, data, "%s", msg);
}
}
Expand Down
5 changes: 3 additions & 2 deletions lightningd/payalgo.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ json_pay_success(struct command *cmd,
static void json_pay_failure(struct command *cmd,
const struct sendpay_result *r)
{
struct json_result *data;
const char *msg;
struct json_result *data = NULL;
const char *msg = NULL;
struct routing_failure *fail;

assert(!r->succeeded);
Expand Down Expand Up @@ -109,6 +109,7 @@ static void json_pay_failure(struct command *cmd,
break;
}

assert(msg);
command_fail_detailed(cmd, r->errorcode, data, "%s", msg);
}

Expand Down