]> Git Repo - qemu.git/blobdiff - block/vhdx-log.c
block/vhdx: Don't take address of fields in packed structs
[qemu.git] / block / vhdx-log.c
index d2f1b98199c8b7d65d6b960bc2d96ecf848d33b0..ecd64266c5ef167f9b07ec42613f46a8918f014f 100644 (file)
@@ -835,11 +835,11 @@ static void vhdx_log_raw_to_le_sector(VHDXLogDescriptor *desc,
     /* 8 + 4084 + 4 = 4096, 1 log sector */
     memcpy(&desc->leading_bytes, data, 8);
     data += 8;
-    cpu_to_le64s(&desc->leading_bytes);
+    desc->leading_bytes = cpu_to_le64(desc->leading_bytes);
     memcpy(sector->data, data, 4084);
     data += 4084;
     memcpy(&desc->trailing_bytes, data, 4);
-    cpu_to_le32s(&desc->trailing_bytes);
+    desc->trailing_bytes = cpu_to_le32(desc->trailing_bytes);
     data += 4;
 
     sector->sequence_high  = (uint32_t) (seq >> 32);
This page took 0.022659 seconds and 4 git commands to generate.