From 7dd7640162800c43f7e826d9e1dbefe4e0f9a734 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Sun, 3 Nov 2013 17:59:28 -0600 Subject: in on_bus_ready(), use g_error_matches(). --- src/device-provider-upower.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/device-provider-upower.c') diff --git a/src/device-provider-upower.c b/src/device-provider-upower.c index cc4adf5..ad5bc98 100644 --- a/src/device-provider-upower.c +++ b/src/device-provider-upower.c @@ -337,7 +337,7 @@ on_bus_ready (GObject * source_object G_GNUC_UNUSED, tmp = g_bus_get_finish (res, &error); if (error != NULL) { - if (error->domain != G_IO_ERROR || error->code != G_IO_ERROR_CANCELLED) + if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) g_warning ("Error acquiring bus: %s", error->message); g_error_free (error); } -- cgit v1.2.3