[wing] namedpipelistener: reduce local variables scope
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [wing] namedpipelistener: reduce local variables scope
- Date: Wed, 21 Dec 2016 18:27:28 +0000 (UTC)
commit 587ac19c3670ac0fc0317283c49a8f011b8d47f4
Author: Ignacio Casal Quinteiro <ignacio casal nice-software com>
Date: Wed Dec 21 19:27:02 2016 +0100
namedpipelistener: reduce local variables scope
wing/wingnamedpipelistener.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/wing/wingnamedpipelistener.c b/wing/wingnamedpipelistener.c
index 2dd3a12..e2370c0 100644
--- a/wing/wingnamedpipelistener.c
+++ b/wing/wingnamedpipelistener.c
@@ -359,8 +359,6 @@ add_sources (WingNamedPipeListener *listener,
GMainContext *context)
{
WingNamedPipeListenerPrivate *priv;
- PipeData *data;
- GSource *source;
GList *sources;
guint i;
@@ -369,6 +367,9 @@ add_sources (WingNamedPipeListener *listener,
sources = NULL;
for (i = 0; i < priv->named_pipes->len; i++)
{
+ PipeData *data;
+ GSource *source;
+
data = priv->named_pipes->pdata[i];
source = wing_create_source (data->overlapped.hEvent,
@@ -388,9 +389,10 @@ add_sources (WingNamedPipeListener *listener,
static void
free_sources (GList *sources)
{
- GSource *source;
while (sources != NULL)
{
+ GSource *source;
+
source = sources->data;
sources = g_list_delete_link (sources, sources);
g_source_destroy (source);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]