[giggle] Do not shadow a global declaration



commit 326bbedeb168d001f5f063d5fc893ee4c17bd87c
Author: Javier Jardón <jjardon gnome org>
Date:   Tue Nov 23 05:14:04 2010 +0100

    Do not shadow a global declaration

 libgiggle-git/giggle-git-ignore.c |   12 ++++++------
 src/giggle-file-list.c            |   10 +++++-----
 src/giggle-main.c                 |    8 ++++----
 src/giggle-rev-list-view.c        |   12 ++++++------
 4 files changed, 21 insertions(+), 21 deletions(-)
---
diff --git a/libgiggle-git/giggle-git-ignore.c b/libgiggle-git/giggle-git-ignore.c
index 303577a..9f5d728 100644
--- a/libgiggle-git/giggle-git-ignore.c
+++ b/libgiggle-git/giggle-git-ignore.c
@@ -247,18 +247,18 @@ giggle_git_ignore_new (const gchar *directory_path)
 static const gchar *
 git_ignore_get_basename (const gchar *path)
 {
-	const gchar *basename;
+	const gchar *the_basename;
 
-	basename = strrchr (path, G_DIR_SEPARATOR);
+	the_basename = strrchr (path, G_DIR_SEPARATOR);
 
-	if (!basename) {
-		basename = path;
+	if (!the_basename) {
+		the_basename = path;
 	} else {
 		/* avoid dir separator */
-		basename++;
+		the_basename++;
 	}
 
-	return basename;
+	return the_basename;
 }
 
 static gboolean
diff --git a/src/giggle-file-list.c b/src/giggle-file-list.c
index 172ea9a..57cd19f 100644
--- a/src/giggle-file-list.c
+++ b/src/giggle-file-list.c
@@ -866,15 +866,15 @@ file_list_create_patch_callback (GiggleGit *git,
 			g_error_free (save_error);
 		} else {
 			gchar *dirname;
-			gchar *basename;
+			gchar *the_basename;
 			gchar *secondary_str;
 			
 			dirname = g_path_get_dirname (filename);
-			basename = g_path_get_basename (filename);
+			the_basename = g_path_get_basename (filename);
+
+			primary_str = g_strdup_printf (_("Patch saved as %s"), the_basename);
+			g_free (the_basename);
 
-			primary_str = g_strdup_printf (_("Patch saved as %s"), basename);
-			g_free (basename);
-			
 			if (!dirname || strcmp (dirname, ".") == 0) {
 				secondary_str = g_strdup_printf (_("Created in project directory"));
 				g_free (dirname);
diff --git a/src/giggle-main.c b/src/giggle-main.c
index 962bd3f..7a33ca3 100644
--- a/src/giggle-main.c
+++ b/src/giggle-main.c
@@ -82,13 +82,13 @@ main (int    argc,
 	g_free (description);
 
 	if (!g_option_context_parse (context, &argc, &argv, &error)) {
-		char *basename = g_filename_display_basename (argv[0]);
+		gchar *the_basename = g_filename_display_basename (argv[0]);
 
-		g_printerr ("%s: %s\n", basename, error->message);
-		g_printerr (_("Try `%s --help' for more information.\n"), basename);
+		g_printerr ("%s: %s\n", the_basename, error->message);
+		g_printerr (_("Try `%s --help' for more information.\n"), the_basename);
 
 		result = EXIT_FAILURE;
-		g_free (basename);
+		g_free (the_basename);
 
 		goto end;
 	}
diff --git a/src/giggle-rev-list-view.c b/src/giggle-rev-list-view.c
index 305560e..4e8bd6c 100644
--- a/src/giggle-rev-list-view.c
+++ b/src/giggle-rev-list-view.c
@@ -1248,15 +1248,15 @@ rev_list_view_create_patch_callback (GiggleGit *git,
 	/* We didn't show any of the errors above, report the success */
 	if (show_success) {
 		gchar *dirname;
-		gchar *basename;
+		gchar *the_basename;
 		gchar *secondary_str;
 
 		dirname = g_path_get_dirname (filename);
-		basename = g_path_get_basename (filename);
-		
-		primary_str = g_strdup_printf (_("Patch saved as %s"), basename);
-		g_free (basename);
-		
+		the_basename = g_path_get_basename (filename);
+
+		primary_str = g_strdup_printf (_("Patch saved as %s"), the_basename);
+		g_free (the_basename);
+
 		if (!dirname || strcmp (dirname, ".") == 0) {
 			secondary_str = g_strdup_printf (_("Created in project directory"));
 			g_free (dirname);



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