浏览代码

junos_dump.pl: Initialize $outfile.

Sebastian Harl 13 年之前
父节点
当前提交
cd2196ed75
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      tools/junos_dump.pl

+ 2 - 2
tools/junos_dump.pl

@@ -156,7 +156,7 @@ if ($opt{p}) {
 }
 
 # Get the name of the output file
-my $outfile = $opt{o};
+my $outfile = $opt{o} || 'dump.xml';
 
 # Retrieve command line arguments
 my %deviceinfo = (
@@ -184,7 +184,7 @@ if ($res) {
 		print STDOUT $res->toString;
 	}
 	else {
-		$res->printToFile($outfile || 'dump.xml');
+		$res->printToFile($outfile);
 	}
 }