mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-01 17:47:30 +01:00
tools: simplify check
in this case, we always need a pointer, so remove the check and just add it to the template
This commit is contained in:
parent
254ee8a5d3
commit
118caae45b
1 changed files with 2 additions and 3 deletions
|
@ -978,9 +978,8 @@ class Subtype(Message):
|
|||
s = '{}->{} = fromwire_{}(cursor, plen);'.format(
|
||||
self.name, f.name, basetype)
|
||||
else:
|
||||
ref = '&' if f.fieldtype.needs_ptr() else ''
|
||||
s = 'fromwire_{}(cursor, plen, {}{}->{});'.format(
|
||||
basetype, ref, self.name, f.name)
|
||||
s = 'fromwire_{}(cursor, plen, &{}->{});'.format(
|
||||
basetype, self.name, f.name)
|
||||
subcalls.append(s)
|
||||
|
||||
return template.format(
|
||||
|
|
Loading…
Add table
Reference in a new issue