X-Git-Url: https://git.octo.it/?p=rrdtool.git;a=blobdiff_plain;f=src%2Frrd_first.c;h=eee8140887fc082c2710b72151eaf30fdad943c3;hp=ab3bd497b9b4c0aaeab5b400be81cd8f48074045;hb=705c8b1988cda51a6d8d34215e3fbf3c12a9aa2a;hpb=b35805403e2bd0ec6b6c862ce8883255203ab0b7 diff --git a/src/rrd_first.c b/src/rrd_first.c index ab3bd49..eee8140 100644 --- a/src/rrd_first.c +++ b/src/rrd_first.c @@ -14,6 +14,7 @@ rrd_first(int argc, char **argv) { int target_rraindex=0; char *endptr; + optind = 0; opterr = 0; /* initialize getopt */ while (1){ static struct option long_options[] = @@ -23,6 +24,7 @@ rrd_first(int argc, char **argv) }; int option_index = 0; int opt; + optind = 0; opterr = 0; /* initialize getopt */ opt = getopt_long(argc, argv, "", long_options, &option_index); if(opt == EOF)