[mutter] restart: Don't pass error as unused user data



commit 81860229ba561b0b5f8e1fbd502d96d138991c6f
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Mon May 30 23:03:58 2022 +0200

    restart: Don't pass error as unused user data
    
    We passed the pointer to a GError * as user data on an async I/O call.
    The callback function didn't make use of it, so it was never written to,
    thus remained NULL, thus was dead code. Remove it.
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2446>

 src/core/restart.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
---
diff --git a/src/core/restart.c b/src/core/restart.c
index 8e87efc1ea..48f64f5998 100644
--- a/src/core/restart.c
+++ b/src/core/restart.c
@@ -174,13 +174,7 @@ meta_restart (const char *message)
 
   g_data_input_stream_read_line_async (data_stream, G_PRIORITY_DEFAULT,
                                        NULL, restart_helper_read_line_callback,
-                                       &error);
-  if (error != NULL)
-    {
-      meta_warning ("Failed to read from restart helper: %s", error->message);
-      g_object_unref (data_stream);
-      goto error;
-    }
+                                       NULL);
 
   return;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]