diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2010-11-08 18:13:58 +0000 |
---|---|---|
committer | Riku Voipio <riku.voipio@nokia.com> | 2010-12-03 15:09:38 +0200 |
commit | 4fa079a0a8523ef7cbcb16bfa85d18e49a61dd26 (patch) | |
tree | 24d40c4a509bcf2f63282fe9b30c11a0703e18de /linux-user | |
parent | e4d32bd2d6c3f37b56208c70cd1cbe1b8c19ce8c (diff) | |
download | qemu-4fa079a0a8523ef7cbcb16bfa85d18e49a61dd26.tar.gz qemu-4fa079a0a8523ef7cbcb16bfa85d18e49a61dd26.tar.bz2 qemu-4fa079a0a8523ef7cbcb16bfa85d18e49a61dd26.zip |
linux-user: remove unnecessary local from __get_user(), __put_user()
Remove an unnecessary local variable from the __get_user() and
__put_user() macros. This avoids confusing compilation failures
if the name of the local variable ('size') happens to be the
same as the variable the macro user is trying to read/write.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
Diffstat (limited to 'linux-user')
-rw-r--r-- | linux-user/qemu.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/linux-user/qemu.h b/linux-user/qemu.h index 00c6549d88..e66a02bce3 100644 --- a/linux-user/qemu.h +++ b/linux-user/qemu.h @@ -264,8 +264,7 @@ static inline int access_ok(int type, abi_ulong addr, abi_ulong size) */ #define __put_user(x, hptr)\ ({\ - int size = sizeof(*hptr);\ - switch(size) {\ + switch(sizeof(*hptr)) {\ case 1:\ *(uint8_t *)(hptr) = (uint8_t)(typeof(*hptr))(x);\ break;\ @@ -286,8 +285,7 @@ static inline int access_ok(int type, abi_ulong addr, abi_ulong size) #define __get_user(x, hptr) \ ({\ - int size = sizeof(*hptr);\ - switch(size) {\ + switch(sizeof(*hptr)) {\ case 1:\ x = (typeof(*hptr))*(uint8_t *)(hptr);\ break;\ |