summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Herlant <herlantj@gmail.com>2018-04-08 15:35:28 -0700
committerJoseph Herlant <herlantj@gmail.com>2018-04-08 15:35:28 -0700
commit690c6b5750b21dacff18ee05ffd59b5d8ceecc40 (patch)
tree04737bf587f7817bef6cdd99c995be99ad6c536f
parent9cac03d37e8018517d9dcc8a6b785657f24e82a8 (diff)
downloadnavit-690c6b5750b21dacff18ee05ffd59b5d8ceecc40.tar.gz
maptool: migrate strdup to g_strdup
-rw-r--r--navit/maptool/osm.c2
-rw-r--r--navit/maptool/osm_protobufdb.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/navit/maptool/osm.c b/navit/maptool/osm.c
index b965fe165..1613f2e56 100644
--- a/navit/maptool/osm.c
+++ b/navit/maptool/osm.c
@@ -2240,7 +2240,7 @@ osm_process_towns(FILE *in, FILE *boundaries, FILE *ways, char *suffix)
if (!item_is_district(*ib))
{
char *townname=item_bin_get_attr(ib, attr_town_name, NULL);
- char *dup=strdup(townname);
+ char *dup=g_strdup(townname);
g_hash_table_replace(town_hash, dup, dup);
}
}
diff --git a/navit/maptool/osm_protobufdb.c b/navit/maptool/osm_protobufdb.c
index 692af1e5d..463817037 100644
--- a/navit/maptool/osm_protobufdb.c
+++ b/navit/maptool/osm_protobufdb.c
@@ -420,7 +420,7 @@ osm_protobufdb_string(struct osm_protobufdb_context *ctx, char *str)
if (!st->n_s) {
st->n_s++;
}
- strd=strdup(str);
+ strd=g_strdup(str);
st->s=g_realloc(st->s, sizeof(st->s[0])*(st->n_s+1));
if (st->n_s == 1) {
st->s[0].data=NULL;