Re: [Libvir] PATCH: Fix stats overflow

2007-11-19 Thread Richard W.M. Jones
Daniel P. Berrange wrote: FYI, I have just applied the attached patch to fix a 32-bit overflow in the stats code. We were doing a left shift of more than 32 bits on '1L' which is only 32-bit wide on 32-bit platforms. I simply cast to a long long instead. Damn ... in OCaml 1L is always 64 bits

Re: [Libvir] PATCH: Fix stats overflow

2007-11-18 Thread Daniel Hokka Zakrisson
Daniel P. Berrange wrote: ... +if (stats-wr_bytes = ((unsigned long long)1)(63-9)) { ... Why not make that 1ULL? -- Daniel Hokka Zakrisson -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[Libvir] PATCH: Fix stats overflow

2007-11-17 Thread Daniel P. Berrange
FYI, I have just applied the attached patch to fix a 32-bit overflow in the stats code. We were doing a left shift of more than 32 bits on '1L' which is only 32-bit wide on 32-bit platforms. I simply cast to a long long instead. Regards, Dan. -- |=- Red Hat, Engineering, Emerging Technologies,