From 30f82c23b6aa805f1c58666f39d3ca0878743ae0 Mon Sep 17 00:00:00 2001 From: oetiker Date: Fri, 22 May 2009 14:54:21 +0000 Subject: [PATCH] reset errno right befor the call I want to test git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1806 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/src/rrd_update.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/program/src/rrd_update.c b/program/src/rrd_update.c index 2fe5b911..5c607027 100644 --- a/program/src/rrd_update.c +++ b/program/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) { @@ -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)) { -- 2.30.2