]> granicus.if.org Git - curl/commitdiff
ftpserver: silence warnings
authorDaniel Stenberg <daniel@haxx.se>
Mon, 29 Apr 2013 12:58:08 +0000 (14:58 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 29 Apr 2013 12:58:08 +0000 (14:58 +0200)
Fix regressions in commit b56e3d43e5d. Make @data local and filter off
non-numerical digits from $testno in STATUS_imap.

tests/ftpserver.pl

index b7dd6313c803a1b8285668bf919f2e338a8ef942..c32165b620b80c8733f32a8755bab5eebe5d4c31 100755 (executable)
@@ -1011,7 +1011,7 @@ sub STATUS_imap {
 
     logmsg "STATUS_imap got test $testno\n";
 
-    $testno =~ s/^([^0-9]*)//;
+    $testno =~ s/[^0-9]//g;
     my $testpart = "";
     if ($testno > 10000) {
         $testpart = $testno % 10000;
@@ -1020,7 +1020,7 @@ sub STATUS_imap {
 
     loadtest("$srcdir/data/test$testno");
 
-    @data = getpart("reply", "data$testpart");
+    my @data = getpart("reply", "data$testpart");
 
     for my $d (@data) {
         sendcontrol $d;