Avoid applying the unary minus operator to an unsigned value

This commit is contained in:
practicalswift
2018-10-10 14:52:55 +02:00
committed by Rusty Russell
parent 1e467bb986
commit a46d712154

View File

@@ -72,7 +72,7 @@ static void htlc_arr_append(const struct htlc ***arr, const struct htlc *htlc)
static s64 balance_adding_htlc(const struct htlc *htlc, enum side side) static s64 balance_adding_htlc(const struct htlc *htlc, enum side side)
{ {
if (htlc_owner(htlc) == side) if (htlc_owner(htlc) == side)
return -htlc->msatoshi; return -(s64)htlc->msatoshi;
return 0; return 0;
} }