[glib: 4/11] Fix global variable name hidden by local variables in gio/gio-tool-save.c




commit c0dabdd8df5b56c35a08c870be9d217ad46b1f18
Author: Loic Le Page <llepage fluendo com>
Date:   Wed Jan 19 17:27:34 2022 +0100

    Fix global variable name hidden by local variables in gio/gio-tool-save.c

 gio/gio-tool-save.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gio/gio-tool-save.c b/gio/gio-tool-save.c
index 30fb3f91e3..4bce0b8c26 100644
--- a/gio/gio-tool-save.c
+++ b/gio/gio-tool-save.c
@@ -36,7 +36,7 @@
 
 #include "gio-tool.h"
 
-static char *etag = NULL;
+static char *global_etag = NULL;
 static gboolean backup = FALSE;
 static gboolean create = FALSE;
 static gboolean append = FALSE;
@@ -54,7 +54,7 @@ static const GOptionEntry entries[] =
   /* Translators: The "etag" is a token allowing to verify whether a file has been modified */
   { "print-etag", 'v', 0, G_OPTION_ARG_NONE, &print_etag, N_("Print new etag at end"), NULL },
   /* Translators: The "etag" is a token allowing to verify whether a file has been modified */
-  { "etag", 'e', 0, G_OPTION_ARG_STRING, &etag, N_("The etag of the file being overwritten"), N_("ETAG") },
+  { "etag", 'e', 0, G_OPTION_ARG_STRING, &global_etag, N_("The etag of the file being overwritten"), 
N_("ETAG") },
   G_OPTION_ENTRY_NULL
 };
 
@@ -82,7 +82,7 @@ save (GFile *file)
   else if (append)
     out = (GOutputStream *)g_file_append_to (file, flags, NULL, &error);
   else
-    out = (GOutputStream *)g_file_replace (file, etag, backup, flags, NULL, &error);
+    out = (GOutputStream *)g_file_replace (file, global_etag, backup, flags, NULL, &error);
   if (out == NULL)
     {
       print_file_error (file, error->message);


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