mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +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
@@ -26,8 +26,8 @@ void towire_fulfilled_htlc(u8 **pptr, const struct fulfilled_htlc *fulfilled)
|
||||
void towire_failed_htlc(u8 **pptr, const struct failed_htlc *failed)
|
||||
{
|
||||
/* Only one can be set. */
|
||||
assert(failed->failcode || tal_len(failed->failreason));
|
||||
assert(!failed->failcode || !tal_len(failed->failreason));
|
||||
assert(failed->failcode || tal_count(failed->failreason));
|
||||
assert(!failed->failcode || !tal_count(failed->failreason));
|
||||
towire_u64(pptr, failed->id);
|
||||
towire_u16(pptr, failed->failcode);
|
||||
if (failed->failcode & UPDATE) {
|
||||
|
||||
Reference in New Issue
Block a user