X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Frrd_first.c;h=85dff4b718ea467802a2333355e60ab886a0205b;hb=96db36a7a6ff75d2fc1353e45434a7f6b1db801b;hp=7452331720d3b8ccd15b5b30a68e05025b9179aa;hpb=6c5e7f32e3052259aa5e14053cb4bab04346ea94;p=rrdtool.git diff --git a/src/rrd_first.c b/src/rrd_first.c index 7452331..85dff4b 100644 --- a/src/rrd_first.c +++ b/src/rrd_first.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.2rc6 Copyright by Tobi Oetiker, 1997-2005 + * RRDtool 1.2.7 Copyright by Tobi Oetiker, 1997-2005 ***************************************************************************** * rrd_first Return ***************************************************************************** @@ -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)