lib/fetcher-util: Use GIOErrorEnum instead of GIOError

Use GIOErrorEnum as the return value for
_ostree_fetcher_http_status_code_to_io_error(), to avoid an
implicit cast from GIOError.

Closes: #1857
Approved by: cgwalters
This commit is contained in:
Robert Fairley authored and Atomic Bot committed 2019-05-20 13:09:28 +00:00
1 parent e493505ade
commit 4929fc38e9
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -219,9 +219,9 @@ _ostree_fetcher_should_retry_request (const GError *error,
}
/* Convert a HTTP status code representing an error from libsoup or libcurl to
* a #GIOError. This will return %G_IO_ERROR_FAILED if the status code is
* a #GIOErrorEnum. This will return %G_IO_ERROR_FAILED if the status code is
* unknown or otherwise unhandled. */
GIOError
GIOErrorEnum
_ostree_fetcher_http_status_code_to_io_error (guint status_code)
{
switch (status_code)
+1 -1
View File
@@ -78,7 +78,7 @@ void _ostree_fetcher_journal_failure (const char *remote_name,
gboolean _ostree_fetcher_should_retry_request (const GError *error,
guint n_retries_remaining);
GIOError _ostree_fetcher_http_status_code_to_io_error (guint status_code);
GIOErrorEnum _ostree_fetcher_http_status_code_to_io_error (guint status_code);
G_END_DECLS