This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix debug code in Perl_malloc() (from Ilya Zakharevich)
[perl5.git] / warnings.pl
index 72d19af..8d3450b 100644 (file)
@@ -300,14 +300,15 @@ sub bits {
     my $catmask ;
     my $fatal = 0 ;
     foreach my $word (@_) {
-       if  ($word eq 'FATAL')
-         { $fatal = 1 }
-       elsif ($catmask = $Bits{$word}) {
-         $mask |= $catmask ;
-         $mask |= $DeadBits{$word} if $fatal ;
+       if  ($word eq 'FATAL') {
+           $fatal = 1;
+       }
+       else {
+           if ($catmask = $Bits{$word}) {
+               $mask |= $catmask ;
+               $mask |= $DeadBits{$word} if $fatal ;
+           }
        }
-       else
-         { croak "unknown warning category '$word'" }
     }
 
     return $mask ;