X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Frrd_restore.c;h=65bbb10438b0d9a7e0e72d0fbcaaa438e20fb46d;hb=b1f329c27b96fcf408f190e5edbb5f671bea10e7;hp=68a037fe6139f1daf949c1489a83dc3e8c08340d;hpb=51fcea2cbf9721f012f2f0d43c604a3aaf684ee8;p=rrdtool.git diff --git a/src/rrd_restore.c b/src/rrd_restore.c index 68a037f..65bbb10 100644 --- a/src/rrd_restore.c +++ b/src/rrd_restore.c @@ -708,20 +708,19 @@ int rrd_restore( char *buf; char rc = 0; char force_overwrite = 0; + struct option long_options[] = { + {"range-check", no_argument, 0, 'r'}, + {"force-overwrite", no_argument, 0, 'f'}, + {0, 0, 0, 0} + }; /* init rrd clean */ optind = 0; opterr = 0; /* initialize getopt */ while (1) { - static struct option long_options[] = { - {"range-check", no_argument, 0, 'r'}, - {"force-overwrite", no_argument, 0, 'f'}, - {0, 0, 0, 0} - }; int option_index = 0; int opt; - opt = getopt_long(argc, argv, "rf", long_options, &option_index); if (opt == EOF)