X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Frrd_first.c;h=a3ad0908ba3c8a2184a5600fa1e6ee42fa1f0864;hb=554df7224e8b3fec9ec5981812b453c43072f150;hp=21cdbdf2b1b2815deeb6321a52901f4e0867e4f7;hpb=f8b321ed9be936455166a5e9297199e84b048526;p=rrdtool.git diff --git a/src/rrd_first.c b/src/rrd_first.c index 21cdbdf..a3ad090 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.4 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)