From 5c2fc4c1cb60f71b048f9eb1a170fb1bf4015ebf Mon Sep 17 00:00:00 2001 From: Jon Griffiths Date: Fri, 27 Nov 2020 13:14:01 +1300 Subject: [PATCH] wally: remove wally casts that are no longer needed Signed-off-by: Jon Griffiths --- bitcoin/psbt.c | 7 ++----- bitcoin/tx.c | 1 - 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/bitcoin/psbt.c b/bitcoin/psbt.c index 1e03d659b..446a45ade 100644 --- a/bitcoin/psbt.c +++ b/bitcoin/psbt.c @@ -4,7 +4,6 @@ #include #include #include -#include #include #include #include @@ -519,16 +518,14 @@ static bool wally_map_set_unknown(const tal_t *ctx, struct wally_map_item *item; assert(value_len != 0); - if (wally_map_find(map, - cast_const(unsigned char *, key), tal_bytelen(key), - &exists_at) != WALLY_OK) + if (wally_map_find(map, key, tal_bytelen(key), &exists_at) != WALLY_OK) return false; /* If not exists, add */ if (exists_at == 0) { bool ok; tal_wally_start(); - ok = wally_map_add(map, cast_const(unsigned char *, key), tal_bytelen(key), + ok = wally_map_add(map, key, tal_bytelen(key), (unsigned char *) memcheck(value, value_len), value_len) == WALLY_OK; tal_wally_end(ctx); diff --git a/bitcoin/tx.c b/bitcoin/tx.c index 3155cecb9..59e328a08 100644 --- a/bitcoin/tx.c +++ b/bitcoin/tx.c @@ -4,7 +4,6 @@ #include #include #include -#include #include #include #include