From 4929fc38e98a384d4f29d8710338b9e2e750f5a7 Mon Sep 17 00:00:00 2001 From: Robert Fairley Date: Wed, 8 May 2019 19:15:53 -0400 Subject: [PATCH] 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 --- src/libostree/ostree-fetcher-util.c | 4 ++-- src/libostree/ostree-fetcher-util.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libostree/ostree-fetcher-util.c b/src/libostree/ostree-fetcher-util.c index ef02ba1e..a9bd60a5 100644 --- a/src/libostree/ostree-fetcher-util.c +++ b/src/libostree/ostree-fetcher-util.c @@ -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) diff --git a/src/libostree/ostree-fetcher-util.h b/src/libostree/ostree-fetcher-util.h index 1cade068..46935402 100644 --- a/src/libostree/ostree-fetcher-util.h +++ b/src/libostree/ostree-fetcher-util.h @@ -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