Skip to content

Commit

Permalink
cvsserver: always initialize state in argsplit()
Browse files Browse the repository at this point in the history
Other code assumes that this is initialized, so do it
even if there were no arguments given.

Signed-off-by: Dirk Koopman <[email protected]>
Signed-off-by: Frank Lichtenheld <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
flichtenheld authored and gitster committed Jul 7, 2007
1 parent 3cd2491 commit 1e76b70
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions git-cvsserver.perl
Original file line number Diff line number Diff line change
Expand Up @@ -1813,14 +1813,14 @@ sub req_annotate
# the second is $state->{files} which is everything after it.
sub argsplit
{
return unless( defined($state->{arguments}) and ref $state->{arguments} eq "ARRAY" );

my $type = shift;

$state->{args} = [];
$state->{files} = [];
$state->{opt} = {};

return unless( defined($state->{arguments}) and ref $state->{arguments} eq "ARRAY" );

my $type = shift;

if ( defined($type) )
{
my $opt = {};
Expand Down

0 comments on commit 1e76b70

Please sign in to comment.