From ba34e6cdc933d29bc84f7b2880f39ecf90958628 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 14 Mar 2018 02:05:55 +1030 Subject: [PATCH] gossipd: use u64 for broadcast index. uintmap uses uint64_t, we should here too. Couldn't resist drive-by style fix for increment :) Signed-off-by: Rusty Russell --- gossipd/broadcast.c | 2 +- gossipd/broadcast.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gossipd/broadcast.c b/gossipd/broadcast.c index 93febfcd4..2afdc39ab 100644 --- a/gossipd/broadcast.c +++ b/gossipd/broadcast.c @@ -71,7 +71,7 @@ bool queue_broadcast(struct broadcast_state *bstate, /* Now add the message to the queue */ msg = new_queued_message(bstate, type, tag, payload); uintmap_add(&bstate->broadcasts, bstate->next_index, msg); - bstate->next_index += 1; + bstate->next_index++; return evicted; } diff --git a/gossipd/broadcast.h b/gossipd/broadcast.h index 296b03a7f..49094763e 100644 --- a/gossipd/broadcast.h +++ b/gossipd/broadcast.h @@ -20,7 +20,7 @@ struct queued_message { }; struct broadcast_state { - u32 next_index; + u64 next_index; UINTMAP(struct queued_message *) broadcasts; };