X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Frrd_xport.c;h=b0610d8bf91aa78d50b55381ccb2a6f200fe43fb;hb=63ec9d67f71e54ddf095dd36cc9b79550040bd86;hp=ac2295bcd1aea33b42f94b4c4c5f51c84c1980bb;hpb=657d850f957a2dd703e3aab2d7cde4b0f9711c15;p=rrdtool.git diff --git a/src/rrd_xport.c b/src/rrd_xport.c index ac2295b..b0610d8 100644 --- a/src/rrd_xport.c +++ b/src/rrd_xport.c @@ -1,5 +1,5 @@ /**************************************************************************** - * RRDtool 1.2.23 Copyright by Tobi Oetiker, 1997-2007 + * RRDtool 1.3rc3 Copyright by Tobi Oetiker, 1997-2008 **************************************************************************** * rrd_xport.c export RRD data ****************************************************************************/ @@ -58,6 +58,14 @@ int rrd_xport( time_t start_tmp = 0, end_tmp = 0; struct rrd_time_value start_tv, end_tv; char *parsetime_error = NULL; + struct option long_options[] = { + {"start", required_argument, 0, 's'}, + {"end", required_argument, 0, 'e'}, + {"maxrows", required_argument, 0, 'm'}, + {"step", required_argument, 0, 261}, + {"enumds", no_argument, 0, 262}, /* these are handled in the frontend ... */ + {0, 0, 0, 0} + }; optind = 0; opterr = 0; /* initialize getopt */ @@ -68,14 +76,6 @@ int rrd_xport( parsetime("now", &end_tv); while (1) { - static struct option long_options[] = { - {"start", required_argument, 0, 's'}, - {"end", required_argument, 0, 'e'}, - {"maxrows", required_argument, 0, 'm'}, - {"step", required_argument, 0, 261}, - {"enumds", no_argument, 0, 262}, /* these are handled in the frontend ... */ - {0, 0, 0, 0} - }; int option_index = 0; int opt; @@ -177,7 +177,7 @@ int rrd_xport_fn( unsigned long nof_xports = 0; unsigned long xport_counter = 0; - unsigned long *ref_list; + int *ref_list; rrd_value_t **srcptr_list; char **legend_list; int ii = 0; @@ -204,7 +204,6 @@ int rrd_xport_fn( break; } } - if (nof_xports == 0) { rrd_set_error("no XPORT found, nothing to do"); return -1;