Skip to content

Commit a46d712

Browse files
practicalswiftrustyrussell
authored andcommitted
Avoid applying the unary minus operator to an unsigned value
1 parent 1e467bb commit a46d712

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

channeld/full_channel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ static void htlc_arr_append(const struct htlc ***arr, const struct htlc *htlc)
7272
static s64 balance_adding_htlc(const struct htlc *htlc, enum side side)
7373
{
7474
if (htlc_owner(htlc) == side)
75-
return -htlc->msatoshi;
75+
return -(s64)htlc->msatoshi;
7676
return 0;
7777
}
7878

0 commit comments

Comments
 (0)