From f64eee717dd079f785326e32a5c59be987513067 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 27 Sep 2018 14:59:17 +0930 Subject: [PATCH] gossipd: make helpers const-correct. Always be const if you can. Signed-off-by: Rusty Russell --- gossipd/routing.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gossipd/routing.h b/gossipd/routing.h index 979fd7929..a6a50df94 100644 --- a/gossipd/routing.h +++ b/gossipd/routing.h @@ -140,7 +140,8 @@ static inline int pubkey_idx(const struct pubkey *id1, const struct pubkey *id2) } /* Fast versions: if you know n is one end of the channel */ -static inline struct node *other_node(const struct node *n, struct chan *chan) +static inline struct node *other_node(const struct node *n, + const struct chan *chan) { int idx = (chan->nodes[1] == n); @@ -159,7 +160,7 @@ static inline struct half_chan *half_chan_from(const struct node *n, } /* If you know n is one end of the channel, get index dst == n */ -static inline int half_chan_to(const struct node *n, struct chan *chan) +static inline int half_chan_to(const struct node *n, const struct chan *chan) { int idx = (chan->nodes[1] == n);