Browse Source

gossipd: fix spurious gcc warning.

It turns out that we don't look at type when we return 0, but gcc isn't
quite smart enough for that.  Initializing to -1 is good practice anyway
for the failure path.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
htlc_accepted_hook
Rusty Russell 6 years ago
parent
commit
c091a4ee40
  1. 1
      gossipd/gossip_store.c

1
gossipd/gossip_store.c

@ -300,6 +300,7 @@ static size_t transfer_store_msg(int from_fd, size_t from_off, int to_fd,
const u8 *p;
size_t tmplen;
*type = -1;
if (pread(from_fd, hdr, sizeof(hdr), from_off) != sizeof(hdr)) {
status_broken("Failed reading header from to gossip store @%zu"
": %s",

Loading…
Cancel
Save