testbot/WineRunTask: Standardize handling of WineRunTask's arguments and add prototypes.

Francois Gouget fgouget at codeweavers.com
Mon Jun 16 05:18:19 CDT 2014


The prototypes let Perl detect when the wrong number of parameters is passed to these functions.
The prototypes also document which arguments are optional.
---
 testbot/bin/WineRunTask.pl | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/testbot/bin/WineRunTask.pl b/testbot/bin/WineRunTask.pl
index 2413a76..86073e6 100755
--- a/testbot/bin/WineRunTask.pl
+++ b/testbot/bin/WineRunTask.pl
@@ -88,7 +88,7 @@ sub FatalError($$$$$)
   exit 1;
 }
 
-sub TakeScreenshot
+sub TakeScreenshot($$)
 {
   my ($VM, $FullScreenshotFileName) = @_;
 
@@ -111,9 +111,9 @@ sub TakeScreenshot
   }
 }
 
-sub CountFailures
+sub CountFailures($)
 {
-  my $ReportFileName = $_[0];
+  my ($ReportFileName) = @_;
 
   if (! open REPORTFILE, "<$ReportFileName")
   {
-- 
2.0.0



More information about the wine-patches mailing list