diff options
author | Anton Altaparmakov <aia21@cantab.net> | 2006-03-23 17:06:08 +0000 |
---|---|---|
committer | Anton Altaparmakov <aia21@cantab.net> | 2006-03-23 17:06:08 +0000 |
commit | 92fe7b9ea8ef101bff3c75ade89b93b5f62a7955 (patch) | |
tree | 3dba4faa78f1bbe4be503275173e3a63b5d60f22 /include/asm-i386/uaccess.h | |
parent | e750d1c7cc314b9ba1934b0b474b7d39f906f865 (diff) | |
parent | b0e6e962992b76580f4900b166a337bad7c1e81b (diff) |
Merge branch 'master' of /usr/src/ntfs-2.6/
Diffstat (limited to 'include/asm-i386/uaccess.h')
-rw-r--r-- | include/asm-i386/uaccess.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/include/asm-i386/uaccess.h b/include/asm-i386/uaccess.h index 3f1337c3420..371457b1ceb 100644 --- a/include/asm-i386/uaccess.h +++ b/include/asm-i386/uaccess.h @@ -197,13 +197,15 @@ extern void __put_user_8(void); #define put_user(x,ptr) \ ({ int __ret_pu; \ + __typeof__(*(ptr)) __pu_val; \ __chk_user_ptr(ptr); \ + __pu_val = x; \ switch(sizeof(*(ptr))) { \ - case 1: __put_user_1(x, ptr); break; \ - case 2: __put_user_2(x, ptr); break; \ - case 4: __put_user_4(x, ptr); break; \ - case 8: __put_user_8(x, ptr); break; \ - default:__put_user_X(x, ptr); break; \ + case 1: __put_user_1(__pu_val, ptr); break; \ + case 2: __put_user_2(__pu_val, ptr); break; \ + case 4: __put_user_4(__pu_val, ptr); break; \ + case 8: __put_user_8(__pu_val, ptr); break; \ + default:__put_user_X(__pu_val, ptr); break; \ } \ __ret_pu; \ }) |