This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/4116] getopt_long does *not* return (or indicate in any way) error condition (if occured) to programmer.
- From: "edvotsyivj at datatech dot ru" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 1 Mar 2007 14:54:51 -0000
- Subject: [Bug libc/4116] getopt_long does *not* return (or indicate in any way) error condition (if occured) to programmer.
- References: <20070301115804.4116.edvotsyivj@datatech.ru>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From edvotsyivj at datatech dot ru 2007-03-01 14:54 -------
Though "getopt_long" points to an option in question in case of errors:
3) option doesn't allow an argument
4) option requires an argument
... by setting "optopt" variable, but leaves it's "longind" parameter untouched.
This cause programmer either scan "longopts" array, or build one more
"switch(...)" to find the option in question.
So, "getopt_long" should be fixed to set "longind"
--
http://sourceware.org/bugzilla/show_bug.cgi?id=4116
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.