author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Wed, 8 Sep 2010 12:15:13 +0000 (12:15 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Wed, 8 Sep 2010 12:15:13 +0000 (12:15 +0000) | ||
commit | f30b8d2ba99f0e62506420d0d72264c6e64e5abf | |
tree | f063b30a23541ab31d12c2aaaee854cd36fe3728 | tree | snapshot |
parent | f9b92b9d5b4498b737db8161b2b01019a84f7b49 | commit | diff |
fix use of setlocale all over the place ...
- old_locale = setlocale(LC_NUMERIC, "C");
+ old_locale = setlocale(LC_NUMERIC, NULL);
+ setlocale(LC_NUMERIC, "C");
the original version never restored the locale since it held a copy of the
new locale and not the old one despite the name. bug found by Pawe? 'Reef' Polewicz
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.3@2127 a5681a0c-68f1-0310-ab6d-d61299d08faa
- old_locale = setlocale(LC_NUMERIC, "C");
+ old_locale = setlocale(LC_NUMERIC, NULL);
+ setlocale(LC_NUMERIC, "C");
the original version never restored the locale since it held a copy of the
new locale and not the old one despite the name. bug found by Pawe? 'Reef' Polewicz
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.3@2127 a5681a0c-68f1-0310-ab6d-d61299d08faa