summaryrefslogtreecommitdiff
path: root/sapi
diff options
context:
space:
mode:
authorJames Moore <jmoore@php.net>2001-05-17 23:57:43 +0000
committerJames Moore <jmoore@php.net>2001-05-17 23:57:43 +0000
commit6026a36879d70e5008183a3de0550e4451b0fb0d (patch)
tree984d9bab9d89d252b7e4e07f715468ebc62cdca6 /sapi
parent873d59a8ea7490acfe4d5c85ff205bde4df4a8d3 (diff)
downloadphp-git-6026a36879d70e5008183a3de0550e4451b0fb0d.tar.gz
Merge the more sensible way of doing this back in to HEAD
Diffstat (limited to 'sapi')
-rw-r--r--sapi/cgi/getopt.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/sapi/cgi/getopt.c b/sapi/cgi/getopt.c
index a20341eef2..120870108a 100644
--- a/sapi/cgi/getopt.c
+++ b/sapi/cgi/getopt.c
@@ -10,7 +10,6 @@
#define OPTERRARG (3)
-char buff[81]; /* too hold option value when needed */
char *ap_php_optarg;
int ap_php_optind = 1;
static int ap_php_opterr = 1;
@@ -110,12 +109,7 @@ int ap_php_getopt(int argc, char* const *argv, const char *optstr)
}
else
{
- int offset = 2;
- int len = 0;
- while(argv[ap_php_optind][offset]) {
- buff[len++] = argv[ap_php_optind][offset++];
- }
- ap_php_optarg = buff;
+ ap_php_optarg = &argv[ap_php_optind][2];
ap_php_optind++;
}
return(*cp);