This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
RE: [PATCH] getopt: Bug fix. Initialize optind
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: "'Shaun Jackman'" <sjackman at gmail dot com>, <newlib at sources dot redhat dot com>
- Date: Tue, 18 Jul 2006 11:45:21 +0100
- Subject: RE: [PATCH] getopt: Bug fix. Initialize optind
On 17 July 2006 23:58, Shaun Jackman wrote:
> On 7/7/06, Shaun Jackman <sjackman@gmail> wrote:
>> If getopt is called with optind == 0 and argc == 1, the EOF case is
>> not detected. optind should be initialized before testing for EOF.
>
> Comments?
:) How about a testcase?
cheers,
DaveK
--
Can't think of a witty .sigline today....