nbd: avoid unaligned uint64_t store
commit667ad26ff8b0e4cabba67322b5e4c35c0b6c4eb8
authorJohn Snow <jsnow@redhat.com>
Thu, 4 Feb 2016 10:27:55 +0000 (4 11:27 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 9 Feb 2016 14:45:26 +0000 (9 15:45 +0100)
treedc8f7401c090e84d52ffb2636e10f840f488a346
parente3dd68df5287e544a41f77a162a02d08fbcb95ba
nbd: avoid unaligned uint64_t store

cpu_to_be64w can't be used to make unaligned stores, but stq_be_p can.
Also, the st?_be_p takes a void* so it is more clearly suited to the
case where you're writing into a byte buffer.

Use the st?_be_p family of functions everywhere in nbd/server.c.

Signed-off-by: John Snow <jsnow@redhat.com>
[Changed to use st?_be_p everywhere. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
nbd/server.c