[PATCH] getopt: Bug fix. Initialize optind

Dave Korn dave.korn@artimi.com
Wed Jul 19 16:51:00 GMT 2006


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....



More information about the Newlib mailing list