]> git.proxmox.com Git - qemu-server.git/commitdiff
fix warning about uninitialized value
authorDietmar Maurer <dietmar@proxmox.com>
Mon, 12 Aug 2013 07:47:02 +0000 (09:47 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 12 Aug 2013 07:47:02 +0000 (09:47 +0200)
PVE/API2/Qemu.pm

index 9450b16d36c96f916cfcfdde5133014b45409ccd..a7014867531c45124f58f498d301e431a3bdee29 100644 (file)
@@ -1551,9 +1551,10 @@ __PACKAGE__->register_method({
        # read spice ticket from STDIN
        my $spice_ticket;
        if ($stateuri && ($stateuri eq 'tcp') && $migratedfrom && ($rpcenv->{type} eq 'cli')) {
-           my $line = <>;
-           chomp $line;
-           $spice_ticket = $line if $line;
+           if (my $line = <>) {
+               chomp $line;
+               $spice_ticket = $line;
+           }
        }
 
        my $storecfg = PVE::Storage::config();