Allow '?IF 0'

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2012-08-08 07:23:43 -07:00
parent ee28638604
commit e8a4728981

View File

@ -1911,7 +1911,7 @@ sub process_conditional( $$$$ ) {
my ( $lastkeyword, $prioromit, $included, $lastlinenumber ) = @ifstack ? @{$ifstack[-1]} : ('', 0, 0, 0 );
if ( $keyword =~ /^IF/ ) {
cond_error( "Missing IF expression" , $filename, $linenumber ) unless $expression;
cond_error( "Missing IF expression" , $filename, $linenumber ) unless supplied $expression;
my $nextomitting = $omitting || ! evaluate_expression( $expression , $filename, $linenumber );
push @ifstack, [ 'IF', $omitting, ! $nextomitting, $linenumber ];
$omitting = $nextomitting;