gnss: warn if ftruncate() fails

This commit is contained in:
Arnaud Ferraris
2021-10-07 11:11:08 +02:00
parent a3d27cb3f7
commit deeb60fa6a

View File

@@ -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);