mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +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
@@ -157,9 +157,9 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
list_for_each(&b11->extra_fields, extra, list) {
|
||||
char *data = tal_arr(ctx, char, tal_len(extra->data)+1);
|
||||
char *data = tal_arr(ctx, char, tal_count(extra->data)+1);
|
||||
|
||||
for (i = 0; i < tal_len(extra->data); i++)
|
||||
for (i = 0; i < tal_count(extra->data); i++)
|
||||
data[i] = bech32_charset[extra->data[i]];
|
||||
|
||||
data[i] = '\0';
|
||||
|
||||
Reference in New Issue
Block a user