Re: [Qemu-devel] [PATCH] nbd: Don't use cpu_to_*w() functions

2016-06-10 Thread Eric Blake
On 06/10/2016 10:15 AM, Peter Maydell wrote: > The cpu_to_*w() functions just compose a pointer dereference > with a byteswap. Instead use st*_p(), which handles potential > pointer misalignment and avoids the need to cast the pointer. > > Signed-off-by: Peter Maydell > --- > nbd/client.c | 10 +

[Qemu-devel] [PATCH] nbd: Don't use cpu_to_*w() functions

2016-06-10 Thread Peter Maydell
The cpu_to_*w() functions just compose a pointer dereference with a byteswap. Instead use st*_p(), which handles potential pointer misalignment and avoids the need to cast the pointer. Signed-off-by: Peter Maydell --- nbd/client.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-)