fix use of setlocale all over the place ...
[rrdtool.git] / src / rrd_tool.c
index 45296c8..cc2aede 100644 (file)
@@ -714,7 +714,8 @@ int HandleInputLine(
         if (rrd_xport
             (argc - 1, &argv[1], &xxsize, &start, &end, &step, &col_cnt,
              &legend_v, &data) != -1) {
-            char *old_locale = setlocale(LC_NUMERIC, "C");
+            char *old_locale = setlocale(LC_NUMERIC,NULL);
+            setlocale(LC_NUMERIC, "C");
             row_cnt = (end - start) / step;
             ptr = data;
             printf("<?xml version=\"1.0\" encoding=\"%s\"?>\n\n",