From e777c55aa7cd84fe63bcdee16acde8d1a293b928 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Thu, 19 Feb 2009 16:22:48 -0300 Subject: Make use of g_error_free instead of g_clear_error when possible. g_clear_error make an extra operation (&err = NULL) which is not necessary when the GError is not reused. --- input/device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'input/device.c') diff --git a/input/device.c b/input/device.c index eb089093..4ab7aabc 100644 --- a/input/device.c +++ b/input/device.c @@ -741,7 +741,7 @@ static void control_connect_cb(GIOChannel *chan, GError *conn_err, error("%s", err->message); reply = connection_attempt_failed(iconn->pending_connect, err->message); - g_clear_error(&err); + g_error_free(err); g_io_channel_close(chan); goto failed; } @@ -939,7 +939,7 @@ static DBusMessage *device_connect(DBusConnection *conn, dbus_message_unref(iconn->pending_connect); iconn->pending_connect = NULL; reply = connection_attempt_failed(msg, err->message); - g_clear_error(&err); + g_error_free(err); return reply; } -- cgit