summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanielle Madeley <danielle.madeley@collabora.co.uk>2010-05-24 13:39:33 +1000
committerDanielle Madeley <danielle.madeley@collabora.co.uk>2010-05-24 13:39:33 +1000
commit84b4e4dc8c00b6e1dd06fca908f28ead1959248e (patch)
treefa71b31f2a15cfc19837413e27e7e5c946a14151
parent9d2a3943af9f95be83cb4fa4371bda23c77f94f6 (diff)
downloadtelepathy-glib-84b4e4dc8c00b6e1dd06fca908f28ead1959248e.tar.gz
Remove variables that shadow global function names
-rw-r--r--examples/client/extended-client.c12
-rw-r--r--examples/client/inspect-channel.c14
-rw-r--r--examples/client/inspect-cm.c12
-rw-r--r--examples/client/inspect-connection.c12
-rw-r--r--examples/client/inspect-contact.c12
-rw-r--r--examples/cm/contactlist/contact-list-manager.c6
-rw-r--r--telepathy-glib/base-connection.c10
-rw-r--r--telepathy-glib/channel.c2
-rw-r--r--telepathy-glib/message-mixin.c10
-rw-r--r--tests/dbus/callable-example.c6
10 files changed, 47 insertions, 49 deletions
diff --git a/examples/client/extended-client.c b/examples/client/extended-client.c
index 79683efc2..bf01b8777 100644
--- a/examples/client/extended-client.c
+++ b/examples/client/extended-client.c
@@ -290,16 +290,16 @@ main (int argc,
{
TpConnectionManager *cm = NULL;
GError *error = NULL;
- TpDBusDaemon *daemon = NULL;
+ TpDBusDaemon *dbus = NULL;
g_type_init ();
tp_debug_set_flags (g_getenv ("EXAMPLE_DEBUG"));
example_cli_init ();
- daemon = tp_dbus_daemon_dup (&error);
+ dbus = tp_dbus_daemon_dup (&error);
- if (daemon == NULL)
+ if (dbus == NULL)
{
g_warning ("%s", error->message);
g_error_free (error);
@@ -308,7 +308,7 @@ main (int argc,
mainloop = g_main_loop_new (NULL, FALSE);
- cm = tp_connection_manager_new (daemon, "example_extended", NULL, &error);
+ cm = tp_connection_manager_new (dbus, "example_extended", NULL, &error);
if (cm == NULL)
{
@@ -327,8 +327,8 @@ out:
if (cm != NULL)
g_object_unref (cm);
- if (daemon != NULL)
- g_object_unref (daemon);
+ if (dbus != NULL)
+ g_object_unref (dbus);
if (mainloop != NULL)
g_main_loop_unref (mainloop);
diff --git a/examples/client/inspect-channel.c b/examples/client/inspect-channel.c
index c4eb3fbf8..fe2584f58 100644
--- a/examples/client/inspect-channel.c
+++ b/examples/client/inspect-channel.c
@@ -121,7 +121,7 @@ main (int argc,
{
InspectChannelData data = { 1, NULL, NULL };
const gchar *conn_name;
- TpDBusDaemon *daemon = NULL;
+ TpDBusDaemon *dbus = NULL;
TpConnection *connection = NULL;
GError *error = NULL;
@@ -141,9 +141,9 @@ main (int argc,
conn_name = argv[1];
data.object_path = argv[2];
- daemon = tp_dbus_daemon_dup (&error);
+ dbus = tp_dbus_daemon_dup (&error);
- if (daemon == NULL)
+ if (dbus == NULL)
{
g_warning ("%s", error->message);
g_error_free (error);
@@ -152,9 +152,9 @@ main (int argc,
}
if (conn_name[0] == '/')
- connection = tp_connection_new (daemon, NULL, conn_name, &error);
+ connection = tp_connection_new (dbus, NULL, conn_name, &error);
else
- connection = tp_connection_new (daemon, conn_name, NULL, &error);
+ connection = tp_connection_new (dbus, conn_name, NULL, &error);
if (connection == NULL)
{
@@ -175,8 +175,8 @@ main (int argc,
g_main_loop_run (data.main_loop);
out:
- if (daemon != NULL)
- g_object_unref (daemon);
+ if (dbus != NULL)
+ g_object_unref (dbus);
if (data.main_loop != NULL)
g_main_loop_unref (data.main_loop);
diff --git a/examples/client/inspect-cm.c b/examples/client/inspect-cm.c
index 549882a74..5b03c2a72 100644
--- a/examples/client/inspect-cm.c
+++ b/examples/client/inspect-cm.c
@@ -131,7 +131,7 @@ main (int argc,
TpConnectionManager *cm = NULL;
GMainLoop *mainloop = NULL;
GError *error = NULL;
- TpDBusDaemon *daemon = NULL;
+ TpDBusDaemon *dbus = NULL;
int ret = 1;
g_type_init ();
@@ -140,9 +140,9 @@ main (int argc,
if (argc < 2)
return 2;
- daemon = tp_dbus_daemon_dup (&error);
+ dbus = tp_dbus_daemon_dup (&error);
- if (daemon == NULL)
+ if (dbus == NULL)
{
g_warning ("%s", error->message);
g_error_free (error);
@@ -154,7 +154,7 @@ main (int argc,
cm_name = argv[1];
manager_file = argv[2]; /* possibly NULL */
- cm = tp_connection_manager_new (daemon, cm_name, manager_file, &error);
+ cm = tp_connection_manager_new (dbus, cm_name, manager_file, &error);
if (cm == NULL)
{
@@ -174,8 +174,8 @@ out:
if (mainloop != NULL)
g_main_loop_unref (mainloop);
- if (daemon != NULL)
- g_object_unref (daemon);
+ if (dbus != NULL)
+ g_object_unref (dbus);
return ret;
}
diff --git a/examples/client/inspect-connection.c b/examples/client/inspect-connection.c
index d9df16119..c4c988532 100644
--- a/examples/client/inspect-connection.c
+++ b/examples/client/inspect-connection.c
@@ -79,7 +79,7 @@ main (int argc,
const gchar *bus_name, *object_path;
TpConnection *connection = NULL;
GMainLoop *mainloop = NULL;
- TpDBusDaemon *daemon = NULL;
+ TpDBusDaemon *dbus = NULL;
GError *error = NULL;
g_type_init ();
@@ -107,16 +107,16 @@ main (int argc,
bus_name = NULL;
}
- daemon = tp_dbus_daemon_dup (&error);
+ dbus = tp_dbus_daemon_dup (&error);
- if (daemon == NULL)
+ if (dbus == NULL)
{
g_warning ("%s", error->message);
g_error_free (error);
goto out;
}
- connection = tp_connection_new (daemon, bus_name, object_path, &error);
+ connection = tp_connection_new (dbus, bus_name, object_path, &error);
if (connection == NULL)
{
@@ -140,8 +140,8 @@ out:
if (mainloop != NULL)
g_main_loop_unref (mainloop);
- if (daemon != NULL)
- g_object_unref (daemon);
+ if (dbus != NULL)
+ g_object_unref (dbus);
return exit_status;
}
diff --git a/examples/client/inspect-contact.c b/examples/client/inspect-contact.c
index c774aac0f..872ef13a6 100644
--- a/examples/client/inspect-contact.c
+++ b/examples/client/inspect-contact.c
@@ -173,7 +173,7 @@ main (int argc,
const gchar *bus_name, *object_path;
TpConnection *connection = NULL;
InspectContactData data = { NULL, 1, NULL };
- TpDBusDaemon *daemon = NULL;
+ TpDBusDaemon *dbus = NULL;
GError *error = NULL;
g_type_init ();
@@ -203,15 +203,15 @@ main (int argc,
data.to_inspect = argv[2];
- daemon = tp_dbus_daemon_dup (&error);
+ dbus = tp_dbus_daemon_dup (&error);
- if (daemon == NULL)
+ if (dbus == NULL)
{
g_warning ("%s", error->message);
goto out;
}
- connection = tp_connection_new (daemon, bus_name, object_path, &error);
+ connection = tp_connection_new (dbus, bus_name, object_path, &error);
if (connection == NULL)
{
@@ -239,8 +239,8 @@ out:
if (connection != NULL)
g_object_unref (connection);
- if (daemon != NULL)
- g_object_unref (daemon);
+ if (dbus != NULL)
+ g_object_unref (dbus);
return data.exit_status;
}
diff --git a/examples/cm/contactlist/contact-list-manager.c b/examples/cm/contactlist/contact-list-manager.c
index 160637ff6..98074c305 100644
--- a/examples/cm/contactlist/contact-list-manager.c
+++ b/examples/cm/contactlist/contact-list-manager.c
@@ -166,14 +166,14 @@ example_contact_list_manager_close_all (ExampleContactListManager *self)
while (g_hash_table_iter_next (&iter, &key, &value))
{
GSList *requests = value;
- GSList *link;
+ GSList *l;
requests = g_slist_reverse (requests);
- for (link = requests; link != NULL; link = link->next)
+ for (l = requests; l != NULL; l = l->next)
{
tp_channel_manager_emit_request_failed (self,
- link->data, TP_ERRORS, TP_ERROR_DISCONNECTED,
+ l->data, TP_ERRORS, TP_ERROR_DISCONNECTED,
"Unable to complete channel request due to disconnection");
}
diff --git a/telepathy-glib/base-connection.c b/telepathy-glib/base-connection.c
index fd1dac317..99cceaaab 100644
--- a/telepathy-glib/base-connection.c
+++ b/telepathy-glib/base-connection.c
@@ -2706,23 +2706,23 @@ tp_base_connection_disconnect_with_dbus_error (TpBaseConnection *self,
GHashTable *details,
TpConnectionStatusReason reason)
{
- GHashTable *dup = NULL;
+ GHashTable *dup_ = NULL;
g_return_if_fail (TP_IS_BASE_CONNECTION (self));
g_return_if_fail (tp_dbus_check_valid_interface_name (error_name, NULL));
if (details == NULL)
{
- dup = g_hash_table_new (g_str_hash, g_str_equal);
- details = dup;
+ dup_ = g_hash_table_new (g_str_hash, g_str_equal);
+ details = dup_;
}
tp_svc_connection_emit_connection_error (self, error_name, details);
tp_base_connection_change_status (self, TP_CONNECTION_STATUS_DISCONNECTED,
reason);
- if (dup != NULL)
- g_hash_table_destroy (dup);
+ if (dup_ != NULL)
+ g_hash_table_destroy (dup_);
}
/**
diff --git a/telepathy-glib/channel.c b/telepathy-glib/channel.c
index 0c0052980..0c90428f0 100644
--- a/telepathy-glib/channel.c
+++ b/telepathy-glib/channel.c
@@ -1759,7 +1759,6 @@ tp_channel_new (TpConnection *conn,
{
TpChannel *ret = NULL;
TpProxy *conn_proxy = (TpProxy *) conn;
- gchar *dup = NULL;
g_return_val_if_fail (TP_IS_CONNECTION (conn), NULL);
g_return_val_if_fail (object_path != NULL, NULL);
@@ -1803,7 +1802,6 @@ tp_channel_new (TpConnection *conn,
NULL));
finally:
- g_free (dup);
return ret;
}
diff --git a/telepathy-glib/message-mixin.c b/telepathy-glib/message-mixin.c
index 46ee0c907..504b4003d 100644
--- a/telepathy-glib/message-mixin.c
+++ b/telepathy-glib/message-mixin.c
@@ -1923,15 +1923,15 @@ tp_message_mixin_get_dbus_property (GObject *object,
{
GPtrArray *arrays = g_ptr_array_sized_new (g_queue_get_length (
mixin->priv->pending));
- GList *link;
+ GList *l;
GType type = dbus_g_type_get_collection ("GPtrArray",
TP_HASH_TYPE_MESSAGE_PART);
- for (link = g_queue_peek_head_link (mixin->priv->pending);
- link != NULL;
- link = g_list_next (link))
+ for (l = g_queue_peek_head_link (mixin->priv->pending);
+ l != NULL;
+ l = g_list_next (l))
{
- TpMessage *msg = link->data;
+ TpMessage *msg = l->data;
g_ptr_array_add (arrays, g_boxed_copy (type, msg->parts));
}
diff --git a/tests/dbus/callable-example.c b/tests/dbus/callable-example.c
index 45d619270..01084192a 100644
--- a/tests/dbus/callable-example.c
+++ b/tests/dbus/callable-example.c
@@ -172,13 +172,13 @@ static void test_dump_stream_events (Test *test) G_GNUC_UNUSED;
static void test_dump_stream_events (Test *test)
{
- GSList *link;
+ GSList *l;
g_message ("Stream events (most recent first):");
- for (link = test->stream_events; link != NULL; link = link->next)
+ for (l = test->stream_events; l != NULL; l = l->next)
{
- StreamEvent *se = link->data;
+ StreamEvent *se = l->data;
switch (se->type)
{