Skip to content

Commit

Permalink
gossipd: minor cleanups.
Browse files Browse the repository at this point in the history
Thanks to m-schmook's feedback.

Signed-off-by: Rusty Russell <[email protected]>
  • Loading branch information
rustyrussell authored and niftynei committed Nov 9, 2020
1 parent 9a575a9 commit 9b0af9f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions gossipd/queries.c
Original file line number Diff line number Diff line change
Expand Up @@ -693,12 +693,15 @@ static u8 *append_range_reply(struct peer *peer,
u16 i, old_num, added;
const struct channel_update_timestamps *ts;
/* Zero means "no timestamp" */
const static struct channel_update_timestamps zero_ts;
const static struct channel_update_timestamps zero_ts = { 0, 0 };

if (timestamps_tlv) {
ts = decode_channel_update_timestamps(tmpctx,
timestamps_tlv);
if (!ts || tal_count(ts) != tal_count(scids)) {
if (!ts)
return towire_errorfmt(peer, NULL,
"reply_channel_range can't decode timestamps.");
if (tal_count(ts) != tal_count(scids)) {
return towire_errorfmt(peer, NULL,
"reply_channel_range %zu timestamps when %zu scids?",
tal_count(ts),
Expand Down

0 comments on commit 9b0af9f

Please sign in to comment.