Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removed unnecessary calls to setlocale()

  • Loading branch information...
commit 403c032e43fd9e630ce7f11159985f95108f68eb 1 parent 03fcc69
@dfandrich dfandrich authored
Showing with 2 additions and 7 deletions.
  1. +1 −3 gpx-read.c
  2. +1 −3 main-command.c
  3. +0 −1  main-gui.c
View
4 gpx-read.c
@@ -292,13 +292,11 @@ int ReadGPX(const char* File, struct GPSTrack* Track)
FirstPoint = NULL;
LastPoint = NULL;
- char* OldLocale = strdup(setlocale(LC_NUMERIC, NULL));
- setlocale(LC_NUMERIC, "C");
+ char* OldLocale = setlocale(LC_NUMERIC, "C");
FindTrackSeg(GPXRoot);
setlocale(LC_NUMERIC, OldLocale);
- free(OldLocale);
/* Clean up stuff for the XML library. */
xmlFreeDoc(GPXData);
View
4 main-command.c
@@ -123,8 +123,7 @@ static int ShowFileDetails(const char* File, int MachineReadable)
if (MachineReadable)
{
- OldLocale = strdup(setlocale(LC_NUMERIC, NULL));
- setlocale(LC_NUMERIC, "C");
+ OldLocale = setlocale(LC_NUMERIC, "C");
}
if (Time)
@@ -170,7 +169,6 @@ static int ShowFileDetails(const char* File, int MachineReadable)
if (MachineReadable) {
setlocale(LC_NUMERIC, OldLocale);
- free(OldLocale);
}
return rc;
View
1  main-gui.c
@@ -30,7 +30,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <stdio.h>
#include <stdlib.h>
#include <gtk/gtk.h>
Please sign in to comment.
Something went wrong with that request. Please try again.