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>
Frank Lichtenheld committed
Jun 17, 2007 at 10:31 UTC
1e76b702c1e754c7e6df1ced9ce6f1863cb7e092
1 file changed
+4
-4
git-cvsserver.perl
+4
-4
@@ -1813,14 +1813,14 @@ sub req_annotate
1813
# the second is $state->{files} which is everything after it.
1814
sub argsplit
1815
{
1816
- return unless( defined($state->{arguments}) and ref $state->{arguments} eq "ARRAY" );
1817
-
1818
- my $type = shift;
1819
-
1816
$state->{args} = [];
1817
$state->{files} = [];
1818
$state->{opt} = {};
1819
1820
+ return unless( defined($state->{arguments}) and ref $state->{arguments} eq "ARRAY" );
1821
+
1822
+ my $type = shift;
1823
+
1824
if ( defined($type) )
1825
{
1826
my $opt = {};