X-Git-Url: https://git.octo.it/?p=rrdtool.git;a=blobdiff_plain;f=src%2Frrd_tune.c;h=52651fdfe4cd3886a301dd27708049fc7ee347ff;hp=65db286f7375509326e4089112587e44df4942b3;hb=96b0f4aace0deef034a792a08dc2d426cd2b61a4;hpb=2a9b0ff9cf29cf82b7b12ea80889c59273d66008 diff --git a/src/rrd_tune.c b/src/rrd_tune.c index 65db286..52651fd 100644 --- a/src/rrd_tune.c +++ b/src/rrd_tune.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.4.2 Copyright by Tobi Oetiker, 1997-2009 + * RRDtool 1.4.3 Copyright by Tobi Oetiker, 1997-2010 ***************************************************************************** * change header parameters of an rrd ***************************************************************************** @@ -126,7 +126,8 @@ int rrd_tune( optcnt++; switch (opt) { case 'h': - old_locale = setlocale(LC_NUMERIC, "C"); + old_locale = setlocale(LC_NUMERIC, NULL); + setlocale(LC_NUMERIC, "C"); if ((matches = sscanf(optarg, DS_NAM_FMT ":%ld", ds_nam, &heartbeat)) != 2) { @@ -146,7 +147,8 @@ int rrd_tune( break; case 'i': - old_locale = setlocale(LC_NUMERIC, "C"); + old_locale = setlocale(LC_NUMERIC, NULL); + setlocale(LC_NUMERIC, "C"); if ((matches = sscanf(optarg, DS_NAM_FMT ":%lf", ds_nam, &min)) < 1) { rrd_set_error("invalid arguments for minimum ds value"); @@ -168,7 +170,8 @@ int rrd_tune( break; case 'a': - old_locale = setlocale(LC_NUMERIC, "C"); + old_locale = setlocale(LC_NUMERIC, NULL); + setlocale(LC_NUMERIC, "C"); if ((matches = sscanf(optarg, DS_NAM_FMT ":%lf", ds_nam, &max)) < 1) { rrd_set_error("invalid arguments for maximum ds value");