1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 08:08:50 -05:00

Fix warnings

This commit is contained in:
Yang Tse 2009-12-24 12:00:43 +00:00
parent ae3892e8ab
commit 6ce407305b

View File

@ -67,8 +67,8 @@ my $nosave=0;
my $controldelay=0; # set to 1 to delay the control connect data sending to my $controldelay=0; # set to 1 to delay the control connect data sending to
# test that curl deals with that nicely # test that curl deals with that nicely
my $slavepid; # for the DATA connection sockfilt slave process my $slavepid; # for the DATA connection sockfilt slave process
my $ipv6; my $ipv6="";
my $ext; # append to log/pid file names my $ext=""; # append to log/pid file names
my $grok_eprt; my $grok_eprt;
my $port = 8921; # just a default my $port = 8921; # just a default
my $listenaddr = "127.0.0.1"; # just a default my $listenaddr = "127.0.0.1"; # just a default
@ -613,9 +613,9 @@ sub MDTM_ftp {
my @data = getpart("reply", "mdtm"); my @data = getpart("reply", "mdtm");
my $reply = $data[0]; my $reply = $data[0];
chomp $reply; chomp $reply if($reply);
if($reply <0) { if($reply && ($reply =~ /^[+-]?\d+$/) && ($reply < 0)) {
sendcontrol "550 $testno: no such file.\r\n"; sendcontrol "550 $testno: no such file.\r\n";
} }
elsif($reply) { elsif($reply) {
@ -629,21 +629,30 @@ sub MDTM_ftp {
sub SIZE_ftp { sub SIZE_ftp {
my $testno = $_[0]; my $testno = $_[0];
my $testpart = "";
if ($testno > 10000) {
$testpart = $testno % 10000;
$testno = int($testno / 10000);
}
loadtest("$srcdir/data/test$testno"); if($testno =~ /^verifiedserver$/) {
if($testno eq "verifiedserver") {
my $response = "WE ROOLZ: $$\r\n"; my $response = "WE ROOLZ: $$\r\n";
my $size = length($response); my $size = length($response);
sendcontrol "213 $size\r\n"; sendcontrol "213 $size\r\n";
return 0; return 0;
} }
if($testno =~ /(\d+)\/?$/) {
$testno = $1;
}
else {
print STDERR "SIZE_ftp: invalid test number: $testno\n";
return 1;
}
my $testpart = "";
if($testno > 10000) {
$testpart = $testno % 10000;
$testno = int($testno / 10000);
}
loadtest("$srcdir/data/test$testno");
my @data = getpart("reply", "size"); my @data = getpart("reply", "size");
my $size = $data[0]; my $size = $data[0];