+Sat Nov 17 11:55:33 UTC 2007 Daniel P. Berrange <berrange@redhat.com>
+
+ * src/stats_linux.c: Fixed overflow of left shift on 32-bit platforms
+
Sat Nov 17 11:04:33 UTC 2007 Daniel P. Berrange <berrange@redhat.com>
* qemud/Makefile.am: Remove protocol.[chx] from EXTRA_DIST.
* an assumed sector size.
*/
if (stats->rd_bytes > 0) {
- if (stats->rd_bytes >= 1L<<(63-9)) {
+ if (stats->rd_bytes >= ((unsigned long long)1)<<(63-9)) {
statsErrorFunc (conn, VIR_ERR_NO_SUPPORT, __FUNCTION__,
"stats->rd_bytes would overflow 64 bit counter",
domid);
stats->rd_bytes *= 512;
}
if (stats->wr_bytes > 0) {
- if (stats->wr_bytes >= 1L<<(63-9)) {
+ if (stats->wr_bytes >= ((unsigned long long)1)<<(63-9)) {
statsErrorFunc (conn, VIR_ERR_NO_SUPPORT, __FUNCTION__,
"stats->wr_bytes would overflow 64 bit counter",
domid);