dir/http: Use gint64 for g_ascii_strtoll return values

g_ascii_strtoll returns gint64; storing the result in a narrower
type (int, gint) silently truncates large values.
This commit is contained in:
razzeee
2026-05-04 17:33:49 +02:00
committed by Sebastian Wick
parent 250516b059
commit cc727e7f09
2 changed files with 2 additions and 2 deletions

View File

@@ -1920,7 +1920,7 @@ append_locations_from_config_file (GPtrArray *locations,
g_autofree char *display_name = NULL;
g_autofree char *priority = NULL;
g_autofree char *storage_type = NULL;
gint priority_val = 0;
gint64 priority_val = 0;
display_name = g_key_file_get_string (keyfile, groups[i], "DisplayName", NULL);
priority = g_key_file_get_string (keyfile, groups[i], "Priority", NULL);

View File

@@ -1184,7 +1184,7 @@ set_cache_http_data_from_headers (CacheHttpData *cache_data,
char *end;
char *max_age = value;
int max_age_sec = g_ascii_strtoll (max_age, &end, 10);
gint64 max_age_sec = g_ascii_strtoll (max_age, &end, 10);
if (*max_age != '\0' && *end == '\0')
{
GTimeVal now;