cvsserver: always initialize state in argsplit()
Other code assumes that this is initialized, so do it even if there were no arguments given. Signed-off-by: Dirk Koopman <djk@tobit.co.uk> Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
3cd2491aa2
commit
1e76b702c1
@ -1813,14 +1813,14 @@ sub req_annotate
|
|||||||
# the second is $state->{files} which is everything after it.
|
# the second is $state->{files} which is everything after it.
|
||||||
sub argsplit
|
sub argsplit
|
||||||
{
|
{
|
||||||
return unless( defined($state->{arguments}) and ref $state->{arguments} eq "ARRAY" );
|
|
||||||
|
|
||||||
my $type = shift;
|
|
||||||
|
|
||||||
$state->{args} = [];
|
$state->{args} = [];
|
||||||
$state->{files} = [];
|
$state->{files} = [];
|
||||||
$state->{opt} = {};
|
$state->{opt} = {};
|
||||||
|
|
||||||
|
return unless( defined($state->{arguments}) and ref $state->{arguments} eq "ARRAY" );
|
||||||
|
|
||||||
|
my $type = shift;
|
||||||
|
|
||||||
if ( defined($type) )
|
if ( defined($type) )
|
||||||
{
|
{
|
||||||
my $opt = {};
|
my $opt = {};
|
||||||
|
Reference in New Issue
Block a user