[PATCH 2/2] vsh: Turn _vshControl::progname into a const string

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

 



From: Michal Privoznik <mprivozn@xxxxxxxxxx>

The aim of the progname member of the _vshControl struct is to
point to argv[0] which is then used in vshOutputLogFile() to
create a prefix for a log message. But the member is never
modified (nor it should be) and thus can be a const char *.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 tools/vsh.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/vsh.h b/tools/vsh.h
index 5970addfb6..8b87c00ff4 100644
--- a/tools/vsh.h
+++ b/tools/vsh.h
@@ -194,7 +194,7 @@ struct _vshControl {
                                  * to program name */
     const char *env_prefix;     /* hardcoded environment variable prefix */
     char *connname;             /* connection name */
-    char *progname;             /* program name */
+    const char *progname;       /* program name */
     vshCmd *cmd;                /* the current command */
     char *cmdstr;               /* string with command */
     bool imode;                 /* interactive mode? */
-- 
2.49.0




[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]

  Powered by Linux