gossipd: fix uninitialized var.

We assert() that it's set by one of the branches (it should be!) but
if we don't hit one it's uninitialized, not NULL.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2018-05-10 12:23:15 +09:30
parent 011d75c618
commit bcb047a729

View File

@ -1897,7 +1897,7 @@ static void connect_failed(struct io_conn *conn, struct reaching *reach)
static struct io_plan *conn_init(struct io_conn *conn, struct reaching *reach)
{
struct addrinfo *ai;
struct addrinfo *ai = NULL;
switch (reach->addr.itype) {
case ADDR_INTERNAL_SOCKNAME: