From 4516725604815ed65eccbe5dba16706e7b3ccde0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Thu, 30 Jan 2020 12:10:18 -0500 Subject: [PATCH] lttng-view: clean-up: static struct viewers array should be const MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau Change-Id: I538bebf471eb15202908c27ab108e27f7f990103 --- src/bin/lttng/commands/view.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bin/lttng/commands/view.c b/src/bin/lttng/commands/view.c index a8dcdd11f..7900ea2de 100644 --- a/src/bin/lttng/commands/view.c +++ b/src/bin/lttng/commands/view.c @@ -69,7 +69,7 @@ enum viewer_type { * NOTE: "lttv" is a shell command and it's not working for exec() family * functions so we might think of removing this wrapper or using bash. */ -static struct viewers { +static const struct viewers { const char *exec_name; enum viewer_type type; } viewers[] = { @@ -80,7 +80,7 @@ static struct viewers { /* Is the session we are trying to view is in live mode. */ static int session_live_mode; -static struct viewers *parse_options(void) +static const struct viewers *parse_options(void) { if (opt_viewer == NULL) { /* Default is babeltrace */ @@ -208,7 +208,7 @@ static int spawn_viewer(const char *trace_path) int ret = 0; struct stat status; const char *viewer_bin = NULL; - struct viewers *viewer; + const struct viewers *viewer; char **argv = NULL; /* Check for --viewer options */ -- 2.34.1