diff options
| author | Marcel Holtmann <marcel@holtmann.org> | 2004-08-11 07:07:12 +0000 | 
|---|---|---|
| committer | Marcel Holtmann <marcel@holtmann.org> | 2004-08-11 07:07:12 +0000 | 
| commit | 8b84723cea240cbd9e55ba2acd683fadb3a79282 (patch) | |
| tree | 97b650aaf2e575f07ff66d902d9cd8120285bf42 /include/bluetooth.h | |
| parent | 1590d5be4605667ca2b405172d99a65c814723b2 (diff) | |
Use memmove for unaligned access, so gcc does not insert a __builtin_memcpy
Diffstat (limited to 'include/bluetooth.h')
| -rw-r--r-- | include/bluetooth.h | 4 | 
1 files changed, 2 insertions, 2 deletions
diff --git a/include/bluetooth.h b/include/bluetooth.h index d6359938..e286ffb9 100644 --- a/include/bluetooth.h +++ b/include/bluetooth.h @@ -93,10 +93,10 @@ enum {  #define bt_put_unaligned(val, ptr) ((void)( *(ptr) = (val) ))  #else  #define bt_get_unaligned(ptr) \ -	({ __typeof__(*(ptr)) __tmp; memcpy(&__tmp, (ptr), sizeof(*(ptr))); __tmp; }) +	({ __typeof__(*(ptr)) __tmp; memmove(&__tmp, (ptr), sizeof(*(ptr))); __tmp; })  #define bt_put_unaligned(val, ptr) \  	({ __typeof__(*(ptr)) __tmp = (val); \ -	memcpy((ptr), &__tmp, sizeof(*(ptr))); \ +	memmove((ptr), &__tmp, sizeof(*(ptr))); \  	(void)0; })  #endif  | 
