[PATCH] util: don't shadow global umask declaration

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

 



Commit 0e1a1a8c introduced umask for virCommand, but the variables
used emit a warning on older compilers about shadowed global
declaration.

Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
---

Notes:
    Pushed as a build-breaker && trivial.

 src/util/vircommand.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/util/vircommand.c b/src/util/vircommand.c
index efb5f69..cbe94f8 100644
--- a/src/util/vircommand.c
+++ b/src/util/vircommand.c
@@ -133,7 +133,7 @@ struct _virCommand {
 #if defined(WITH_SECDRIVER_APPARMOR)
     char *appArmorProfile;
 #endif
-    int umask;
+    int mask;
 };

 /* See virCommandSetDryRun for description for this variable */
@@ -583,8 +583,8 @@ virExec(virCommandPtr cmd)

     /* child */

-    if (cmd->umask)
-        umask(cmd->umask);
+    if (cmd->mask)
+        umask(cmd->mask);
     ret = EXIT_CANCELED;
     openmax = sysconf(_SC_OPEN_MAX);
     if (openmax < 0) {
@@ -1085,12 +1085,12 @@ virCommandSetMaxFiles(virCommandPtr cmd, unsigned int files)
     cmd->maxFiles = files;
 }

-void virCommandSetUmask(virCommandPtr cmd, int umask)
+void virCommandSetUmask(virCommandPtr cmd, int mask)
 {
     if (!cmd || cmd->has_error)
         return;

-    cmd->umask = umask;
+    cmd->mask = mask;
 }

 /**
-- 
2.1.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]