Mercurial > hg > freeDiameter
changeset 792:0f566e550813
improved the previous fix... not sure it was correct
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Thu, 12 Jul 2012 22:37:32 +0200 |
parents | 42fa209a8cc4 |
children | ada5366bca4e |
files | libfdproto/messages.c |
diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libfdproto/messages.c Thu Jul 12 22:31:20 2012 +0200 +++ b/libfdproto/messages.c Thu Jul 12 22:37:32 2012 +0200 @@ -1326,8 +1326,7 @@ /* The location is not on 64b boundary, so we split the writing in two operations to avoid sigbus */ #define PUT_in_buf_64( _u64data, _bufptr ) { \ uint64_t __v = htonll((uint64_t)(_u64data)); \ - *(uint32_t *)(_bufptr) = (uint32_t)(__v); \ - *(((uint32_t *)(_bufptr))+1) = (uint32_t)(__v >> 32); \ + memcpy(_bufptr, &__v, sizeof(__v)); \ } /* Write a message header in the buffer */