lightningd: fix compile error in peer_control

Error on gcc 7.3.0:

lightningd/peer_control.c: In function ‘json_close’:
lightningd/peer_control.c:955:3: error: ‘channel’ may be used uninitialized in
  this function [-Werror=maybe-uninitialized]
   channel_set_state(channel,
   ^~~~~~~~~~~~~~~~~~~~~~~~~~
       channel->state, CHANNELD_SHUTTING_DOWN);

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin 2018-12-30 11:21:42 -05:00 committed by Rusty Russell
parent 4d9190aa47
commit 0fa209c64d

View File

@ -901,7 +901,7 @@ static struct command_result *json_close(struct command *cmd,
{
const jsmntok_t *idtok;
struct peer *peer;
struct channel *channel;
struct channel *channel = NULL;
unsigned int *timeout;
bool *force;