mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 09:34:24 +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
@@ -68,7 +68,7 @@ static void set_pubkey(struct pubkey *key)
|
||||
|
||||
#define eq_var(p1, p2, field) \
|
||||
(tal_count((p1)->field) == tal_count((p2)->field) \
|
||||
&& (tal_count((p1)->field) == 0 || memcmp((p1)->field, (p2)->field, tal_len((p1)->field)) == 0))
|
||||
&& (tal_count((p1)->field) == 0 || memcmp((p1)->field, (p2)->field, tal_bytelen((p1)->field)) == 0))
|
||||
|
||||
/* Convenience structs for everyone! */
|
||||
struct msg_error {
|
||||
|
||||
Reference in New Issue
Block a user