mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 21:35:11 +01:00
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>
This commit is contained in:
parent
fae593c448
commit
c091a4ee40
@ -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…
Reference in New Issue
Block a user