diff options
author | Juan Quintela <quintela@redhat.com> | 2011-06-16 17:37:09 +0100 |
---|---|---|
committer | Riku Voipio <riku.voipio@iki.fi> | 2011-06-21 20:30:09 +0300 |
commit | 1add86983cbc972a3431368203f630e290c3f2bb (patch) | |
tree | 0a6dc9b277cb57e1b08b3d3136ab4864ec460da3 /linux-user/syscall.c | |
parent | 331c23b5ca44293d13299d12f1a36826395d7254 (diff) |
syscall: really return ret code
We assign ret with the error code, but then return 0 unconditionally.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
Diffstat (limited to 'linux-user/syscall.c')
-rw-r--r-- | linux-user/syscall.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 9f9693e806..00484f1f18 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -3799,10 +3799,10 @@ static abi_long do_get_thread_area(CPUX86State *env, abi_ulong ptr) #ifndef TARGET_ABI32 static abi_long do_arch_prctl(CPUX86State *env, int code, abi_ulong addr) { - abi_long ret; + abi_long ret = 0; abi_ulong val; int idx; - + switch(code) { case TARGET_ARCH_SET_GS: case TARGET_ARCH_SET_FS: @@ -3821,13 +3821,13 @@ static abi_long do_arch_prctl(CPUX86State *env, int code, abi_ulong addr) idx = R_FS; val = env->segs[idx].base; if (put_user(val, addr, abi_ulong)) - return -TARGET_EFAULT; + ret = -TARGET_EFAULT; break; default: ret = -TARGET_EINVAL; break; } - return 0; + return ret; } #endif |