| 253 | } |
| 254 | |
| 255 | WARN_UNUSED_RESULT bool amount_msat_add(struct amount_msat *val, |
| 256 | struct amount_msat a, |
| 257 | struct amount_msat b) |
| 258 | { |
| 259 | if (add_overflows_u64(a.millisatoshis, b.millisatoshis)) |
| 260 | return false; |
| 261 | |
| 262 | val->millisatoshis = a.millisatoshis + b.millisatoshis; |
| 263 | return true; |
| 264 | } |
| 265 | |
| 266 | WARN_UNUSED_RESULT bool amount_msat_sub(struct amount_msat *val, |
| 267 | struct amount_msat a, |
no test coverage detected