reset optind opterr inside the function calls ...
[rrdtool.git] / src / rrd_create.c
index bb32a3e..95dbc14 100644 (file)
@@ -23,6 +23,7 @@ rrd_create(int argc, char **argv)
     char *parsetime_error = NULL;
     long              long_tmp;
     int               rc;
+    optind = 0; opterr = 0;  /* initialize getopt */
 
     while (1){
        static struct option long_options[] =