Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Marshall <keithmarshall@@users.sf.net>2008-09-20 02:41:01 +0400
committerKeith Marshall <keithmarshall@@users.sf.net>2008-09-20 02:41:01 +0400
commitacf5111a6f42c88183021a0779765731796ccbdd (patch)
tree6839bff1e3c0d52073b36a8164ad48a36c67427d /winsup/mingw/mingwex
parentbe66dbed41083b50597a025239cfa857f972a221 (diff)
Fix MinGW-Bug [2119504].
Diffstat (limited to 'winsup/mingw/mingwex')
-rw-r--r--winsup/mingw/mingwex/getopt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/mingw/mingwex/getopt.c b/winsup/mingw/mingwex/getopt.c
index 40016ad3c..86fc5c615 100644
--- a/winsup/mingw/mingwex/getopt.c
+++ b/winsup/mingw/mingwex/getopt.c
@@ -283,12 +283,12 @@ struct option *opt, int index, int *retindex, const CHAR *optstring )
/* when the caller has provided a return buffer ...
*/
- if( retindex != NULL )
+ if( opt[index].flag != NULL )
{
/* ... then we place the proper return value there,
* and return a status code of zero ...
*/
- *retindex = opt[index].val;
+ *(opt[index].flag) = opt[index].val;
return 0;
}
/* ... otherwise, the return value becomes the status code.