dual-openingd: msg_type should be dualopend_wire not u8

clang did the hard work here:

openingd/dualopend.c:958:42: error: result of comparison of constant 'WIRE_DUAL_OPEN_FAIL' (7003) with expression of type 'u8' (aka 'unsigned char') is always false
      [-Werror,-Wtautological-constant-out-of-range-compare]
        if ((msg_type = fromwire_peektype(msg)) == WIRE_DUAL_OPEN_FAIL) {
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~

Co-Authored-by: the clang compiler
Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
This commit is contained in:
Antoine Poinsot 2020-09-22 21:59:58 +02:00 committed by Rusty Russell
parent de7b41695f
commit 4b4fe2f4fb
1 changed files with 1 additions and 1 deletions

View File

@ -853,7 +853,7 @@ static u8 *accepter_start(struct state *state, const u8 *oc2_msg)
struct penalty_base *pbase;
struct amount_msat our_msats;
struct amount_sat total;
u8 msg_type;
enum dualopend_wire msg_type;
state->our_role = ACCEPTER;
open_tlv = tlv_opening_tlvs_new(tmpctx);