diff options
| author | Peter Maydell | 2016-06-06 20:58:18 +0200 |
|---|---|---|
| committer | Riku Voipio | 2016-06-08 11:06:57 +0200 |
| commit | 7dcdaeafe07dd87079c4e073bced4cfc8bf5fdf3 (patch) | |
| tree | 13676af7bd6175a7f3f9670e3e757c72ca946e75 /linux-user/strace.c | |
| parent | linux-user: Correct signedness of target_flock l_start and l_len fields (diff) | |
| download | qemu-7dcdaeafe07dd87079c4e073bced4cfc8bf5fdf3.tar.gz qemu-7dcdaeafe07dd87079c4e073bced4cfc8bf5fdf3.tar.xz qemu-7dcdaeafe07dd87079c4e073bced4cfc8bf5fdf3.zip | |
linux-user: Make target_strerror() return 'const char *'
Make target_strerror() return 'const char *' rather than just 'char *';
this will allow us to return constant strings from it for some special
cases.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'linux-user/strace.c')
| -rw-r--r-- | linux-user/strace.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/linux-user/strace.c b/linux-user/strace.c index 0810c85fbd..c5980a128c 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -281,7 +281,7 @@ print_ipc(const struct syscallname *name, static void print_syscall_ret_addr(const struct syscallname *name, abi_long ret) { - char *errstr = NULL; + const char *errstr = NULL; if (ret < 0) { errstr = target_strerror(-ret); @@ -1594,7 +1594,7 @@ void print_syscall_ret(int num, abi_long ret) { int i; - char *errstr = NULL; + const char *errstr = NULL; for(i=0;i<nsyscalls;i++) if( scnames[i].nr == num ) { |
