diff options
author | Patrick Höhn <hoehnp@gmx.de> | 2018-01-22 23:35:33 +0100 |
---|---|---|
committer | Patrick Höhn <hoehnp@gmx.de> | 2018-01-22 23:39:00 +0100 |
commit | 3d525ff7a53d34cdc9e84a1c617525e0b5342d54 (patch) | |
tree | 1c4ef0d59de20535618bc852a141242a2ed2f7e2 /navit | |
parent | 1f8bc199df8dae7207eb2b7b80924ede736eda6d (diff) | |
download | navit-3d525ff7a53d34cdc9e84a1c617525e0b5342d54.tar.gz |
corrected files considering more comments by @pgrandin
Diffstat (limited to 'navit')
-rw-r--r-- | navit/maptool/tile.c | 15 | ||||
-rw-r--r-- | navit/maptool/zip.c | 5 |
2 files changed, 11 insertions, 9 deletions
diff --git a/navit/maptool/tile.c b/navit/maptool/tile.c index 237558a68..76469376c 100644 --- a/navit/maptool/tile.c +++ b/navit/maptool/tile.c @@ -409,14 +409,15 @@ write_aux_tiles(struct zip_info *zip_info) if (fread(buffer, at->size, 1, f) == 0){ dbg(lvl_warning, "fread failed"); fclose(f); - continue; } - fclose(f); - write_zipmember(zip_info, at->name, zip_get_maxnamelen(zip_info), buffer, at->size); - free(buffer); - count++; - l=g_list_next(l); - zip_add_member(zip_info); + else{ + fclose(f); + write_zipmember(zip_info, at->name, zip_get_maxnamelen(zip_info), buffer, at->size); + free(buffer); + count++; + l=g_list_next(l); + zip_add_member(zip_info); + } } return count; } diff --git a/navit/maptool/zip.c b/navit/maptool/zip.c index 497b6fd24..601d6eb67 100644 --- a/navit/maptool/zip.c +++ b/navit/maptool/zip.c @@ -193,9 +193,10 @@ zip_write_index(struct zip_info *info) if (fread(buffer, size, 1, info->index) == 0){ dbg(lvl_warning, "fread failed"); - return; } - write_zipmember(info, "index", strlen("index"), buffer, size); + else{ + write_zipmember(info, "index", strlen("index"), buffer, size); + } info->zipnum++; } |