X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Frrd_update.c;h=11d92bb58af9acc732d2b2ec63357b65a2f3a837;hb=d1fe50003e73e2772e9026f29c0ba658143dec7a;hp=df596667485ab656479d4ff57cffbabffb4a681e;hpb=35f5945e114df7324be00de01bcde77e096a2373;p=rrdtool.git diff --git a/src/rrd_update.c b/src/rrd_update.c index df59666..11d92bb 100644 --- a/src/rrd_update.c +++ b/src/rrd_update.c @@ -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) {