You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@apache.org on 2002/04/13 21:52:59 UTC
cvs commit: httpd-2.0/modules/generators mod_cgi.c
wrowe 02/04/13 12:52:59
Modified: modules/generators mod_cgi.c
Log:
Wasted at least 20 minutes reparsing this code till I determined it's
correct. But make the sucker legible so noone else repeats the experience.
Revision Changes Path
1.132 +2 -2 httpd-2.0/modules/generators/mod_cgi.c
Index: mod_cgi.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/generators/mod_cgi.c,v
retrieving revision 1.131
retrieving revision 1.132
diff -u -r1.131 -r1.132
--- mod_cgi.c 13 Apr 2002 19:50:46 -0000 1.131
+++ mod_cgi.c 13 Apr 2002 19:52:59 -0000 1.132
@@ -515,11 +515,11 @@
int numwords, x, idx;
char *w;
const char *args = r->args;
- const char *argv0;
if (replace_cmd) {
/* Allow suexec's "/" check to succeed */
- if ((argv0 = strrchr(r->filename, '/')) != NULL)
+ const char *argv0 = strrchr(r->filename, '/');
+ if (argv0 != NULL)
argv0++;
else
argv0 = r->filename;