X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Frrd_update.c;h=1896466797a0bf6c54ef24d17c68bc40d651f048;hb=554df7224e8b3fec9ec5981812b453c43072f150;hp=ca71e4f5f7ae63a4805f9562d527d850967512b7;hpb=f439b204fb1481edd6a777a3b172ccd722b5b6ed;p=rrdtool.git diff --git a/src/rrd_update.c b/src/rrd_update.c index ca71e4f..1896466 100644 --- a/src/rrd_update.c +++ b/src/rrd_update.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.2rc5 Copyright by Tobi Oetiker, 1997-2005 + * RRDtool 1.2.4 Copyright by Tobi Oetiker, 1997-2005 ***************************************************************************** * rrd_update.c RRD Update Function ***************************************************************************** @@ -89,7 +89,7 @@ int main(int argc, char **argv){ rrd_update(argc,argv); if (rrd_test_error()) { - printf("RRDtool 1.2rc5 Copyright by Tobi Oetiker, 1997-2005\n\n" + printf("RRDtool 1.2.4 Copyright by Tobi Oetiker, 1997-2005\n\n" "Usage: rrdupdate filename\n" "\t\t\t[--template|-t ds-name:ds-name:...]\n" "\t\t\ttime|N:value[:value...]\n\n" @@ -109,6 +109,7 @@ info_t *rrd_update_v(int argc, char **argv) char *template = NULL; info_t *result = NULL; infoval rc; + optind = 0; opterr = 0; /* initialize getopt */ while (1) { static struct option long_options[] = @@ -155,6 +156,7 @@ rrd_update(int argc, char **argv) { char *template = NULL; int rc; + optind = 0; opterr = 0; /* initialize getopt */ while (1) { static struct option long_options[] = @@ -1383,11 +1385,7 @@ _rrd_update(char *filename, char *template, int argc, char **argv, * critical except during the burning cycles. */ if (schedule_smooth) { -#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__) rrd_file = fopen(filename,"rb+"); -#else - rrd_file = fopen(filename,"r+"); -#endif rra_start = rra_begin; for (i = 0; i < rrd.stat_head -> rra_cnt; ++i) {