From 7dcdaeafe07dd87079c4e073bced4cfc8bf5fdf3 Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Mon, 6 Jun 2016 19:58:18 +0100 Subject: 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 Signed-off-by: Riku Voipio Reviewed-by: Laurent Vivier --- linux-user/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux-user/syscall.c') 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; -- cgit 1.4.1