[libgnome-volume-control] gvc-mixer-control: Fix uninitialized	variable usage
- From: Rui Matos <rtcm src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [libgnome-volume-control] gvc-mixer-control: Fix uninitialized	variable usage
 
- Date: Thu, 11 Feb 2016 17:44:12 +0000 (UTC)
 
commit 3af25601db68387e7818f87c2c3144ea4431c14a
Author: Rui Matos <tiagomatos gmail com>
Date:   Thu Feb 11 18:34:11 2016 +0100
    gvc-mixer-control: Fix uninitialized variable usage
 gvc-mixer-control.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gvc-mixer-control.c b/gvc-mixer-control.c
index e2186b1..67ac412 100644
--- a/gvc-mixer-control.c
+++ b/gvc-mixer-control.c
@@ -2107,12 +2107,12 @@ sink_info_cb (pa_context         *c,
         if (i->card != data->headset_card)
                 return;
 
+        s = data->port_name_to_set;
+
         if (i->active_port &&
             strcmp (i->active_port->name, s) == 0)
                 return;
 
-        s = data->port_name_to_set;
-
         for (j = 0; j < i->n_ports; j++)
                 if (strcmp (i->ports[j]->name, s) == 0)
                         break;
@@ -2144,11 +2144,11 @@ source_info_cb (pa_context           *c,
         if (i->card != data->headset_card)
                 return;
 
+        s = data->port_name_to_set;
+
         if (i->active_port && strcmp (i->active_port->name, s) == 0)
                 return;
 
-        s = data->port_name_to_set;
-
         for (j = 0; j < i->n_ports; j++)
                 if (strcmp (i->ports[j]->name, s) == 0)
                         break;
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]