Re: [RFC] Documentation about unaligned memory access

DM
2007-11-26T09:14:24Z

On Nov 23, 2007 1:15 AM, Daniel Drake <dsd@gentoo.org> wrote:
[...]
>
> Before I do so, any comments on the following?
>
[...]
> void myfunc(u8 *data, u32 value)
> {
> [...]
> value = cpu_to_le32(value);
> memcpy(data, value, sizeof(value));
> [...]
> }

I suppose you mean:
memcpy(data, &value, sizeof(value));

/DM