mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-18 22:54:25 +01:00
take: allocate temporary variables off NULL.
If we're going to simply take() a pointer, don't allocate it off a random object. Using NULL makes our intent clear, particularly with allocating packets we're going to take() onto a queue. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -293,7 +293,7 @@ void channel_fail_permanent(struct channel *channel, const char *fmt, ...)
|
||||
va_end(ap);
|
||||
|
||||
if (channel->scid) {
|
||||
msg = towire_gossip_disable_channel(channel,
|
||||
msg = towire_gossip_disable_channel(NULL,
|
||||
channel->scid,
|
||||
channel->peer->direction,
|
||||
false);
|
||||
@@ -390,7 +390,7 @@ void channel_fail_transient(struct channel *channel, const char *fmt, ...)
|
||||
if (ld->no_reconnect)
|
||||
return;
|
||||
#endif /* DEVELOPER */
|
||||
u8 *msg = towire_gossipctl_reach_peer(channel,
|
||||
u8 *msg = towire_gossipctl_reach_peer(NULL,
|
||||
&channel->peer->id);
|
||||
subd_send_msg(ld->gossip, take(msg));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user