diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-10-06 22:21:01 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-10-06 22:21:01 +0000 |
commit | 5c31fe265f48e9f7a87cd75f886b0dba007f8864 (patch) | |
tree | 9437f08f61212dae9014b2a4f3ef6d2f83189057 /include/asm-mips | |
parent | d75b0048c0f66f3878ce8d1083cdea65d867e887 (diff) |
Add extra brackets to make {get,put}_unaligned macros safe against
macro abuse. Patch from Jun Sun.
Diffstat (limited to 'include/asm-mips')
-rw-r--r-- | include/asm-mips/unaligned.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/asm-mips/unaligned.h b/include/asm-mips/unaligned.h index eb975cade..b6cf431d3 100644 --- a/include/asm-mips/unaligned.h +++ b/include/asm-mips/unaligned.h @@ -121,16 +121,16 @@ extern inline void __stw_u(unsigned long __val, unsigned short * __addr) do { \ switch (sizeof(*(ptr))) { \ case 1: \ - *(unsigned char *)ptr = (val); \ + *(unsigned char *)(ptr) = (val); \ break; \ case 2: \ - __stw_u(val, (unsigned short *)ptr); \ + __stw_u(val, (unsigned short *)(ptr)); \ break; \ case 4: \ - __stl_u(val, (unsigned int *)ptr); \ + __stl_u(val, (unsigned int *)(ptr)); \ break; \ case 8: \ - __stq_u(val, (unsigned long long *)ptr); \ + __stq_u(val, (unsigned long long *)(ptr)); \ break; \ default: \ __put_unaligned_bad_length(); \ |