X-Git-Url: https://git.octo.it/?p=rrdtool.git;a=blobdiff_plain;f=src%2Frrd_update.c;h=11a00bb5f036b81e5dbc5cccf2a76b7ecdf88e0c;hp=2fe5b91156648adde07ba86f7ffc0595d61b36dc;hb=8a092a1ac0d22448114c29c2d872769340965132;hpb=e3d98af81f19a3b538921265392d61100b0f83e2 diff --git a/src/rrd_update.c b/src/rrd_update.c index 2fe5b91..11a00bb 100644 --- a/src/rrd_update.c +++ b/src/rrd_update.c @@ -1081,8 +1081,8 @@ static int update_pdp_prep( rate = pdp_new[ds_idx] / interval; break; case DST_GAUGE: - errno = 0; old_locale = setlocale(LC_NUMERIC, "C"); + errno = 0; pdp_new[ds_idx] = strtod(updvals[ds_idx + 1], &endptr) * interval; if (errno) { @@ -1896,7 +1896,7 @@ static int write_to_rras( scratch_idx = CDP_secondary_val, step_subtract = 2) { - off_t rra_pos_new; + size_t rra_pos_new; #ifdef DEBUG fprintf(stderr, " -- RRA Preseek %ld\n", rrd_file->pos); #endif @@ -1979,6 +1979,7 @@ static int write_RRA_row( rrd->ds_def[ds_idx].ds_nam), RD_I_VAL, iv); } + errno = 0; if (rrd_write(rrd_file, &(rrd->cdp_prep[cdp_idx].scratch[CDP_scratch_idx]. u_val), sizeof(rrd_value_t)) != sizeof(rrd_value_t)) {