From da186459017f5daa4999a4215bcdaeb3ced61613 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 26 Jun 2017 10:38:56 +0930 Subject: [PATCH] tools/generate-wire.py: don't avoice tal_count() on NULL. It actually works fine with recent ccan/tal (returning 0). Signed-off-by: Rusty Russell --- tools/generate-wire.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/generate-wire.py b/tools/generate-wire.py index ad2777bc3..6ae1e9acb 100755 --- a/tools/generate-wire.py +++ b/tools/generate-wire.py @@ -346,7 +346,7 @@ class Message(object): field_decls = [] for f in self.fields: if f.is_len_var: - field_decls.append('\t{0} {1} = {2} ? tal_count({2}) : 0;'.format( + field_decls.append('\t{0} {1} = tal_count({2});'.format( f.fieldtype.name, f.name, f.lenvar_for.name ));