[gnome-bluetooth] [PATCH 10/12] libgsm: do not shadow function parameter
Ladislav Michl
ladis at linux-mips.org
Sun Jan 15 04:48:18 EST 2017
Signed-off-by: Ladislav Michl <ladis at linux-mips.org>
---
libgsm/glibgsmtest.c | 8 +++-----
libgsm/phonemgr-utils.c | 8 +++-----
2 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/libgsm/glibgsmtest.c b/libgsm/glibgsmtest.c
index eb3316a..7dbcfe0 100644
--- a/libgsm/glibgsmtest.c
+++ b/libgsm/glibgsmtest.c
@@ -234,11 +234,9 @@ main (int argc, char **argv)
g_printerr ("Failed to delete data at location '%s'\n", delete_uuid);
}
} else if (enter_main_loop != FALSE) {
- GMainLoop *loop;
-
- loop = g_main_loop_new (NULL, FALSE);
- g_main_loop_run (loop);
- g_main_loop_unref (loop);
+ GMainLoop *l = g_main_loop_new (NULL, FALSE);
+ g_main_loop_run (l);
+ g_main_loop_unref (l);
} else {
g_message ("Nothing to do!");
}
diff --git a/libgsm/phonemgr-utils.c b/libgsm/phonemgr-utils.c
index 156b99e..5463da3 100644
--- a/libgsm/phonemgr-utils.c
+++ b/libgsm/phonemgr-utils.c
@@ -511,12 +511,10 @@ phonemgr_utils_connect (const char *device, const char *driver, int channel, gbo
config = phonemgr_utils_write_config (driver ? driver : default_driver, device, channel);
if (debug != FALSE) {
- char *debug;
-
- debug = phonemgr_utils_config_append_debug (config);
+ char *str = phonemgr_utils_config_append_debug (config);
g_free (config);
- lines = g_strsplit (debug, "\n", -1);
- g_free (debug);
+ lines = g_strsplit (str, "\n", -1);
+ g_free (str);
} else {
lines = g_strsplit (config, "\n", -1);
g_free (config);
--
2.11.0
More information about the gnome-bluetooth
mailing list