[gnome-control-center] printers: Remove goto
- From: Marek Kašík <mkasik src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] printers: Remove goto
- Date: Wed, 28 Nov 2018 11:56:51 +0000 (UTC)
commit dd9ddf4c9cc40f4b6492ec9c8adbef28a6f5e290
Author: Robert Ancell <robert ancell canonical com>
Date: Fri Nov 23 11:11:19 2018 +1300
printers: Remove goto
Not necessary since the use of g_autoptr
panels/printers/pp-host.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/panels/printers/pp-host.c b/panels/printers/pp-host.c
index 3129e0389..101aa0feb 100644
--- a/panels/printers/pp-host.c
+++ b/panels/printers/pp-host.c
@@ -642,7 +642,10 @@ _pp_host_get_lpd_devices_thread (GTask *task,
address = g_strdup_printf ("%s:%d", priv->hostname, port);
if (address == NULL || address[0] == '/')
- goto out;
+ {
+ g_task_return_pointer (task, devices, (GDestroyNotify) pp_devices_list_free);
+ return;
+ }
client = g_socket_client_new ();
@@ -717,7 +720,6 @@ _pp_host_get_lpd_devices_thread (GTask *task,
g_list_free_full (candidates, g_free);
}
-out:
g_task_return_pointer (task, devices, (GDestroyNotify) pp_devices_list_free);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]