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/syscall.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/syscall.c')
-rw-r--r-- | linux-user/syscall.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 7b7bae6fda..262c645d3c 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -630,7 +630,7 @@ static inline int is_error(abi_long ret) return (abi_ulong)ret >= (abi_ulong)(-4096); } -char *target_strerror(int err) +const char *target_strerror(int err) { if ((err >= ERRNO_TABLE_SIZE) || (err < 0)) { return NULL; |