Module Name:    src
Committed By:   apb
Date:           Sat Sep  5 12:50:33 UTC 2009

Modified Files:
        src/external/gpl2/xcvs/dist/src: admin.c

Log Message:
It's expected that config will be NULL in a cvs client, but not
in a server or with a local CVSROOT.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/gpl2/xcvs/dist/src/admin.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl2/xcvs/dist/src/admin.c
diff -u src/external/gpl2/xcvs/dist/src/admin.c:1.3 src/external/gpl2/xcvs/dist/src/admin.c:1.4
--- src/external/gpl2/xcvs/dist/src/admin.c:1.3	Fri Apr 10 11:20:29 2009
+++ src/external/gpl2/xcvs/dist/src/admin.c	Sat Sep  5 12:50:33 2009
@@ -327,8 +327,17 @@
     while ((c = getopt (argc, argv,
 			"+ib::c:a:A:e::l::u::LUn:N:m:o:s:t::IqxV:k:")) != -1)
     {
-	if (c != 'q' && !strchr (config->UserAdminOptions, c))
+	if (config != NULL) {
+	    if (c != 'q' && !strchr (config->UserAdminOptions, c))
+		only_allowed_options = false;
+	} else {
+#ifdef CLIENT_SUPPORT
+	    assert(current_parsed_root->isremote);
 	    only_allowed_options = false;
+#else
+	    assert(0); /* config should not be NULL, except in a client */
+#endif
+	}
 
 	switch (c)
 	{

Reply via email to