Code

fix use of setlocale all over the place ...
[rrdtool-all.git] / program / src / rrd_create.c
index 4e98d53c40be069539ee45c19334f271362f631b..d9fd6fffa9652149f25a84dab892e8e36ae7af5f 100644 (file)
@@ -574,7 +574,8 @@ void parseGENERIC_DS(
        &(rrd -> ds_def[ds_idx].par[DS_mrhb_cnt].u_cnt),
        minstr,maxstr);
      */
-    old_locale = setlocale(LC_NUMERIC, "C");
+    old_locale = setlocale(LC_NUMERIC, NULL);
+    setlocale(LC_NUMERIC, "C");
     if (sscanf(def, "%lu:%18[^:]:%18[^:]",
                &(rrd->ds_def[ds_idx].par[DS_mrhb_cnt].u_cnt),
                minstr, maxstr) == 3) {