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>
This commit is contained in:
Peter Maydell authored and Riku Voipio committed 2016-06-08 12:06:57 +03:00
1 parent 8efb2ed5ec
commit 7dcdaeafe0
3 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -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;