Skip to content

Commit 08240ea

Browse files
rustyrussellcdecker
authored andcommitted
FIXUP! Don't use magic 0 constatn in addr.type.
Signed-off-by: Rusty Russell <[email protected]>
1 parent 6cdeed0 commit 08240ea

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
@@ -842,7 +842,7 @@ static void gossipd_getpeers_complete(struct subd *gossip, const u8 *msg,
842842
list_for_each(&gpa->cmd->ld->peers, p, list) {
843843
json_object_start(response, NULL);
844844
json_add_string(response, "state", peer_state_name(p->state));
845-
if (p->addr.type > 0)
845+
if (p->addr.type != ADDR_TYPE_PADDING)
846846
json_add_string(response, "netaddr",
847847
type_to_string(response, struct wireaddr,
848848
&p->addr));

0 commit comments

Comments
 (0)