mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-06 23:20:34 +01:00
bluez: no need to check for valid GError if glib function fails
Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
parent
c3e644fbb4
commit
daef45bdc0
1 changed files with 3 additions and 6 deletions
|
|
@ -305,8 +305,7 @@ on_adapter_acquired (GObject *object, GAsyncResult *res, NMBluezDevice *self)
|
|||
priv->adapter = g_dbus_proxy_new_for_bus_finish (res, &error);
|
||||
|
||||
if (!priv->adapter) {
|
||||
nm_log_warn (LOGD_BT, "failed to acquire adapter proxy: %s.",
|
||||
error && error->message ? error->message : "(unknown)");
|
||||
nm_log_warn (LOGD_BT, "failed to acquire adapter proxy: %s.", error->message);
|
||||
g_clear_error (&error);
|
||||
return;
|
||||
}
|
||||
|
|
@ -431,8 +430,7 @@ on_proxy_acquired (GObject *object, GAsyncResult *res, NMBluezDevice *self)
|
|||
priv->proxy5 = g_dbus_proxy_new_for_bus_finish (res, &error);
|
||||
|
||||
if (!priv->proxy5) {
|
||||
nm_log_warn (LOGD_BT, "failed to acquire device proxy: %s.",
|
||||
error && error->message ? error->message : "(unknown)");
|
||||
nm_log_warn (LOGD_BT, "failed to acquire device proxy: %s.", error->message);
|
||||
g_clear_error (&error);
|
||||
g_signal_emit (self, signals[INITIALIZED], 0, FALSE);
|
||||
return;
|
||||
|
|
@ -453,8 +451,7 @@ on_bus_acquired (GObject *object, GAsyncResult *res, NMBluezDevice *self)
|
|||
priv->dbus_connection = g_bus_get_finish (res, &error);
|
||||
|
||||
if (!priv->dbus_connection) {
|
||||
nm_log_warn (LOGD_BT, "failed to acquire bus connection: %s.",
|
||||
error && error->message ? error->message : "(unknown)");
|
||||
nm_log_warn (LOGD_BT, "failed to acquire bus connection: %s.", error->message);
|
||||
g_clear_error (&error);
|
||||
g_signal_emit (self, signals[INITIALIZED], 0, FALSE);
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue