diff options
author | Simon Glass <sjg@chromium.org> | 2024-08-07 16:47:19 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-08-09 16:03:19 -0600 |
commit | 46ef4e82200fcfdf156fc2374ffd3c8aa19dee79 (patch) | |
tree | 46cbdc4879e4f376506bf68953cb9a6e65dd4d13 /arch/sandbox/cpu/os.c | |
parent | 6f4c31c2b658358628b5b0fa801f55c7477c7585 (diff) |
sandbox: Use const in os_jump_to_file()
The argument array is not changed by the callee, so mark it const.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Diffstat (limited to 'arch/sandbox/cpu/os.c')
-rw-r--r-- | arch/sandbox/cpu/os.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/sandbox/cpu/os.c b/arch/sandbox/cpu/os.c index 46ff305b536..a04eb5aa18c 100644 --- a/arch/sandbox/cpu/os.c +++ b/arch/sandbox/cpu/os.c @@ -808,7 +808,7 @@ static int make_exec(char *fname, const void *data, int size) * @count: Number of arguments in @add_args * Return: 0 if OK, -ENOMEM if out of memory */ -static int add_args(char ***argvp, char *add_args[], int count) +static int add_args(char ***argvp, const char *add_args[], int count) { char **argv, **ap; int argc; @@ -859,7 +859,7 @@ static int os_jump_to_file(const char *fname, bool delete_it) struct sandbox_state *state = state_get_current(); char mem_fname[30]; int fd, err; - char *extra_args[5]; + const char *extra_args[5]; char **argv = state->argv; int argc; #ifdef DEBUG |