From: Michal Privoznik <mpriv...@redhat.com>

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 <mpriv...@redhat.com>
---
 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

Reply via email to