From: Michal Privoznik Date: Fri, 11 Apr 2025 14:40:41 +0000 (+0200) Subject: vsh: Turn _vshControl::progname into a const string X-Git-Tag: v11.3.0-rc1~24 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ac6519084c2036618c3625ea5738a7eeb052346a;p=thirdparty%2Flibvirt.git 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 --- 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? */