Skip to content

Commit 6eafbbd

Browse files
committed
regen/embed.pl: Add a condition to an 'if'
$argname is used inside this 'if' as part of a newly created array element. It needs to be defined for the code to work that later looks at that element. No current calls result in an undefined value for this.
1 parent 8e03088 commit 6eafbbd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

regen/embed.pl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,12 @@ sub generate_proto_h {
274274
die_at_end "$func: $arg ($n) doesn't have a name\n";
275275
}
276276
my $argname = $1;
277-
if (!$nocheck and defined $argtype and exists $type_asserts{$argtype}) {
277+
278+
if ( defined $argname
279+
and ! $nocheck
280+
and defined $argtype
281+
and exists $type_asserts{$argtype})
282+
{
278283
push @typed_args, [ $argtype, $argname ];
279284
}
280285

0 commit comments

Comments
 (0)