From ac6519084c2036618c3625ea5738a7eeb052346a Mon Sep 17 00:00:00 2001 From: Michal Privoznik Date: Fri, 11 Apr 2025 16:40:41 +0200 Subject: [PATCH] vsh: Turn _vshControl::progname into a const string 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 Reviewed-by: Jiri Denemark --- 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.47.3