Skip to content

Commit 0fa209c

Browse files
jb55rustyrussell
authored andcommitted
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>
1 parent 4d9190a commit 0fa209c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lightningd/peer_control.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,7 @@ static struct command_result *json_close(struct command *cmd,
901901
{
902902
const jsmntok_t *idtok;
903903
struct peer *peer;
904-
struct channel *channel;
904+
struct channel *channel = NULL;
905905
unsigned int *timeout;
906906
bool *force;
907907

0 commit comments

Comments
 (0)