[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#521257: Use of uninitialized value in bitwise or (|) at /usr/share/lintian/lib/Lintian/Command.pm line 308.



Raphael Geissert <atomo64+debian@gmail.com> writes:

> --- a/lib/Lintian/Command.pm
> +++ b/lib/Lintian/Command.pm
> @@ -303,7 +303,7 @@ all the executions of kill_kill.
>  =cut
>
>  sub kill {
> -    my $status;
> +    my $status = 0;
>      while (my $opts = shift @_) {
>         $status |= kill_kill($opts->{'harness'}, grace => 2);
>      }

Also, ||= is more correct, although if the return value of kill_kill is
always either 1 or 0, it won't matter in this case.  (But |= is almost
always wrong in Perl unless you're actually manipulating bitmasks.)

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>



Reply to: