X-Git-Url: https://git.octo.it/?a=blobdiff_plain;ds=sidebyside;f=src%2Frrd_first.c;h=eee8140887fc082c2710b72151eaf30fdad943c3;hb=ad994d046d175fec8f67cc3b7cddf3cb77d341be;hp=21cdbdf2b1b2815deeb6321a52901f4e0867e4f7;hpb=f8b321ed9be936455166a5e9297199e84b048526;p=rrdtool.git diff --git a/src/rrd_first.c b/src/rrd_first.c index 21cdbdf..eee8140 100644 --- a/src/rrd_first.c +++ b/src/rrd_first.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.2rc7 Copyright by Tobi Oetiker, 1997-2005 + * RRDtool 1.2.0 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)