diff --git a/src/gnss.c b/src/gnss.c index 502612c..6503943 100644 --- a/src/gnss.c +++ b/src/gnss.c @@ -216,7 +216,8 @@ static void fetch_assistance_data(struct EG25Manager *manager) } lseek(manager->gnss_assistance_fd, 0, SEEK_SET); - ftruncate(manager->gnss_assistance_fd, 0); + if (ftruncate(manager->gnss_assistance_fd, 0) < 0) + g_warning("Unable to truncate file, assistance data might be invalid!"); url = g_strconcat(manager->gnss_assistance_url, "/", manager->gnss_assistance_file, NULL);