opt: get rid of last remnant of getopt.
authorRusty Russell <rusty@rustcorp.com.au>
Thu, 1 Dec 2011 06:09:50 +0000 (16:39 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Thu, 1 Dec 2011 06:09:50 +0000 (16:39 +1030)
Testing code still using it.

ccan/opt/test/utils.c

index 21e0b727ebd6cab4762526dc5a21a11a3eb5f072..7378d844de74f4be986ca9ce43ea2f5fe91717b4 100644 (file)
@@ -3,7 +3,6 @@
 #include <stdarg.h>
 #include <stdlib.h>
 #include <ccan/opt/opt.h>
-#include <getopt.h>
 #include <string.h>
 #include <stdio.h>
 #include "utils.h"
@@ -77,8 +76,6 @@ bool parse_args(int *argc, char ***argv, ...)
 
        *argv = a;
        allocated = true;
-       /* Re-set before parsing. */
-       optind = 0;
 
        return opt_parse(argc, *argv, save_err_output);
 }