Skip to content

Commit 4b4fe2f

Browse files
darosiorrustyrussell
authored andcommitted
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>
1 parent de7b416 commit 4b4fe2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

openingd/dualopend.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ static u8 *accepter_start(struct state *state, const u8 *oc2_msg)
853853
struct penalty_base *pbase;
854854
struct amount_msat our_msats;
855855
struct amount_sat total;
856-
u8 msg_type;
856+
enum dualopend_wire msg_type;
857857

858858
state->our_role = ACCEPTER;
859859
open_tlv = tlv_opening_tlvs_new(tmpctx);

0 commit comments

Comments
 (0)