On Wed, Aug 12, 2009 at 12:21:48PM +0100, Mark McLoughlin wrote: > On Wed, 2009-08-12 at 12:04 +0100, Daniel P. Berrange wrote: > > On Tue, Aug 11, 2009 at 01:25:59PM +0200, Chris Lalancette wrote: > > > > struct qemud_save_header { > > > char magic[sizeof(QEMUD_SAVE_MAGIC)-1]; > > > int version; > > > int xml_len; > > > int was_running; > > > - int unused[16]; > > > + char compressed; > > > + int unused[15]; > > > }; > > > > Little mistake here - you removed sizeof(int) bytes, but only > > added sizeof(char) replacement. > > struct alignment will cause padding to be added between the fields. Hmm, true, but I think it'll be a little non-obvious to people if adding more fields in the future. Should add a char padding[3] to make it clear. Regards, Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| -- Libvir-list mailing list Libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list