Code

reset optind opterr inside the function calls ...
[rrdtool.git] / src / rrd_create.c
index bb32a3ec062f99b7ec4a0be6674e0afb0cd7c4d8..95dbc143ed035c4ea7e053628e49bdd8998bd4e2 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[] =