]> git.street.me.uk Git - andy/viking.git/blobdiff - src/datasource_osm_my_traces.c
Fix incorrect GPSBabel/Garmin symbol names.
[andy/viking.git] / src / datasource_osm_my_traces.c
index abe947dc2f9a927af2702bbf78039aa7f6a10788..4b5c4e7dce03a071f13d0aff0bb137b3440c33d9 100644 (file)
@@ -22,8 +22,6 @@
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
-#include <string.h>
-#include <limits.h>
 
 #include <glib/gprintf.h>
 #include <glib/gi18n.h>
 
 #include <glib/gprintf.h>
 #include <glib/gi18n.h>
@@ -35,8 +33,6 @@
 #include "gpx.h"
 #include "acquire.h"
 #include "osm-traces.h"
 #include "gpx.h"
 #include "acquire.h"
 #include "osm-traces.h"
-#include "preferences.h"
-#include "curl_download.h"
 #include "datasource_gps.h"
 #include "bbox.h"
 
 #include "datasource_gps.h"
 #include "bbox.h"
 
@@ -275,12 +271,12 @@ static void gpx_meta_data_start ( xml_data *xd, const char *el, const char **att
                        xd->current_gpx_meta_data->name = g_strdup ( tmp );
 
                if ( ( tmp = get_attr ( attr, "lat" ) ) ) {
                        xd->current_gpx_meta_data->name = g_strdup ( tmp );
 
                if ( ( tmp = get_attr ( attr, "lat" ) ) ) {
-                       g_snprintf (buf, sizeof (buf), tmp);
+                       g_strlcpy ( buf, tmp, sizeof (buf) );
                        xd->current_gpx_meta_data->ll.lat = g_ascii_strtod ( buf, NULL );
                }
 
                if ( ( tmp = get_attr ( attr, "lon" ) ) ) {
                        xd->current_gpx_meta_data->ll.lat = g_ascii_strtod ( buf, NULL );
                }
 
                if ( ( tmp = get_attr ( attr, "lon" ) ) ) {
-                       g_snprintf (buf, sizeof (buf), tmp);
+                       g_strlcpy ( buf, tmp, sizeof (buf) );
                        xd->current_gpx_meta_data->ll.lon = g_ascii_strtod ( buf, NULL );
                }
 
                        xd->current_gpx_meta_data->ll.lon = g_ascii_strtod ( buf, NULL );
                }