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

Alexandre Julliard julliard at winehq.org
Tue Jun 17 14:37:58 CDT 2014


Module: tools
Branch: master
Commit: 12189400e6a39e8cef0dd21443a51b7fabdd9bb8
URL:    http://source.winehq.org/git/tools.git/?a=commit;h=12189400e6a39e8cef0dd21443a51b7fabdd9bb8

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Mon Jun 16 12:18:19 2014 +0200

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

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")
   {




More information about the wine-cvs mailing list