Skip to content

Commit ea1553c

Browse files
spikehkuba-moo
authored andcommitted
ynl-gen-cpp: fix getting addressof optionals
Signed-off-by: David Wei <[email protected]>
1 parent ae19494 commit ea1553c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ynl-gen-cpp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ def _attr_policy(self, policy):
516516
return f"NLA_POLICY_BITFIELD32({mask})"
517517

518518
def attr_put(self, ri, var):
519-
line = f"ynl_attr_put(nlh, {self.enum_name}, &{var}->{self.c_name}, sizeof(struct nla_bitfield32))"
519+
line = f"ynl_attr_put(nlh, {self.enum_name}, &(*{var}.{self.c_name}), sizeof(struct nla_bitfield32))"
520520
self._attr_put_line(ri, var, line)
521521

522522
def _attr_get(self, ri, var):

0 commit comments

Comments
 (0)