From: James Moore Date: Thu, 17 May 2001 23:57:43 +0000 (+0000) Subject: Merge the more sensible way of doing this back in to HEAD X-Git-Tag: PRE_GRANULAR_GARBAGE_FIX~371 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6026a36879d70e5008183a3de0550e4451b0fb0d;p=php Merge the more sensible way of doing this back in to HEAD --- 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);