mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
Remove tal_len, use tal_count() or tal_bytelen().
tal_count() is used where there's a type, even if it's char or u8, and tal_bytelen() is going to replace tal_len() for clarity: it's only needed where a pointer is void. We shim tal_bytelen() for now. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
eae9b81099
commit
5cf34d6618
@@ -65,8 +65,8 @@ static void tx_must_be_eq(const struct bitcoin_tx *a,
|
||||
lina = linearize_tx(tmpctx, a);
|
||||
linb = linearize_tx(tmpctx, b);
|
||||
|
||||
for (i = 0; i < tal_len(lina); i++) {
|
||||
if (i >= tal_len(linb))
|
||||
for (i = 0; i < tal_count(lina); i++) {
|
||||
if (i >= tal_count(linb))
|
||||
errx(1, "Second tx is truncated:\n"
|
||||
"%s\n"
|
||||
"%s",
|
||||
@@ -80,7 +80,7 @@ static void tx_must_be_eq(const struct bitcoin_tx *a,
|
||||
tal_hex(tmpctx, lina),
|
||||
tal_hex(tmpctx, linb));
|
||||
}
|
||||
if (i != tal_len(linb))
|
||||
if (i != tal_count(linb))
|
||||
errx(1, "First tx is truncated:\n"
|
||||
"%s\n"
|
||||
"%s",
|
||||
|
||||
Reference in New Issue
Block a user