git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] cvsserver: always initialize state in argsplit()

From
Frank Lichtenheld <frank@lichtenheld.de>
Date
Jun 17, 2007, 08:31 UTC
Message-ID
<11820690621003-git-send-email-frank@lichtenheld.de>
In-Reply-To
<11820198064114-git-send-email-djk@tobit.co.uk>

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>
---
 git-cvsserver.perl |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
 Hrm, sorry to Dirk for the double mail. This time actually
 send to the list and not to git@localhost ...
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index 5cbf27e..10aba50 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -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 = {};
-- 
1.5.2.1
Previous: Martin Langhoff
Message 8 of 8 in “cvsserver: fix legacy cvs client and branch rev issues”
  1. cvsserver: fix legacy cvs client and branch rev issuesDirk Koopman, Jun 16, 2007
  2. Frank LichtenheldJun 17, 2007
  3. Dirk KoopmanJun 17, 2007
  4. Frank LichtenheldJun 17, 2007
  5. Dirk KoopmanJun 17, 2007
  6. Frank LichtenheldJun 17, 2007
  7. Martin LanghoffJun 17, 2007
  8. cvsserver: always initialize state in argsplit()Frank Lichtenheld, Jun 17, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.