c: silence warnings

This commit is contained in:
William Casarin
2023-01-01 10:30:40 -08:00
parent 9666180db5
commit b65d9a49ff
4 changed files with 6 additions and 6 deletions

View File

@@ -297,7 +297,7 @@ static char *decode_c(struct bolt11 *b11,
if (!pull_uint(hu5, data, data_len, &c, data_length * 5))
return tal_fmt(b11, "c: length %zu chars is excessive",
*data_len);
b11->min_final_cltv_expiry = c;
b11->min_final_cltv_expiry = (u32)c;
/* Can overflow, since c is 64 bits but value must be < 32 bits */
if (b11->min_final_cltv_expiry != c)
return tal_fmt(b11, "c: %"PRIu64" is too large", c);