X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Frrd_fetch.c;h=c065793992dc0f1fcecf90bed8b40e9a1214f693;hb=8238f5f6f0b38b8237a6edd081772b03d9f448cb;hp=422f59b0fcf9c1e371c66dc3803ff8a53f210c05;hpb=dd86fdf1b4d99437b9aa19934e02230c090cc1d5;p=rrdtool.git diff --git a/src/rrd_fetch.c b/src/rrd_fetch.c index 422f59b..c065793 100644 --- a/src/rrd_fetch.c +++ b/src/rrd_fetch.c @@ -69,14 +69,18 @@ int rrd_fetch( char ***ds_namv, /* names of data sources */ rrd_value_t **data) { /* two dimensional array containing the data */ - - long step_tmp = 1; time_t start_tmp = 0, end_tmp = 0; const char *cf; struct rrd_time_value start_tv, end_tv; char *parsetime_error = NULL; + struct option long_options[] = { + {"resolution", required_argument, 0, 'r'}, + {"start", required_argument, 0, 's'}, + {"end", required_argument, 0, 'e'}, + {0, 0, 0, 0} + }; optind = 0; opterr = 0; /* initialize getopt */ @@ -86,12 +90,6 @@ int rrd_fetch( parsetime("now", &end_tv); while (1) { - static struct option long_options[] = { - {"resolution", required_argument, 0, 'r'}, - {"start", required_argument, 0, 's'}, - {"end", required_argument, 0, 'e'}, - {0, 0, 0, 0} - }; int option_index = 0; int opt;