[mutter] config: Combine two exit paths



commit 4b2b431700788f9d9bf8106ca9fa85e52eca9c4b
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Thu Oct 23 15:49:06 2014 -0700

    config: Combine two exit paths

 src/backends/meta-monitor-config.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/backends/meta-monitor-config.c b/src/backends/meta-monitor-config.c
index ac83cd9..a421761 100644
--- a/src/backends/meta-monitor-config.c
+++ b/src/backends/meta-monitor-config.c
@@ -863,16 +863,13 @@ apply_configuration (MetaMonitorConfig  *self,
                     MetaMonitorManager *manager)
 {
   GPtrArray *crtcs, *outputs;
+  gboolean ret = FALSE;
 
   crtcs = g_ptr_array_new_full (config->n_outputs, (GDestroyNotify)meta_crtc_info_free);
   outputs = g_ptr_array_new_full (config->n_outputs, (GDestroyNotify)meta_output_info_free);
 
   if (!meta_monitor_config_assign_crtcs (config, manager, crtcs, outputs))
-    {
-      g_ptr_array_unref (crtcs);
-      g_ptr_array_unref (outputs);
-      return FALSE;
-    }
+    goto out;
 
   meta_monitor_manager_apply_configuration (manager,
                                             (MetaCRTCInfo**)crtcs->pdata, crtcs->len,
@@ -884,9 +881,12 @@ apply_configuration (MetaMonitorConfig  *self,
    * inside turn_off_laptop_display / apply_configuration_with_lid */
   self->current_is_for_laptop_lid = FALSE;
 
+  ret = TRUE;
+
+ out:
   g_ptr_array_unref (crtcs);
   g_ptr_array_unref (outputs);
-  return TRUE;
+  return ret;
 }
 
 static gboolean


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