mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-29 17:33:09 +00:00
Fixed 32-bit overflow
This commit is contained in:
parent
6bb2d376b5
commit
2efc8ff757
@ -1,3 +1,7 @@
|
|||||||
|
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>
|
Sat Nov 17 11:04:33 UTC 2007 Daniel P. Berrange <berrange@redhat.com>
|
||||||
|
|
||||||
* qemud/Makefile.am: Remove protocol.[chx] from EXTRA_DIST.
|
* qemud/Makefile.am: Remove protocol.[chx] from EXTRA_DIST.
|
||||||
|
@ -200,7 +200,7 @@ read_bd_stats (virConnectPtr conn, xenUnifiedPrivatePtr priv,
|
|||||||
* an assumed sector size.
|
* an assumed sector size.
|
||||||
*/
|
*/
|
||||||
if (stats->rd_bytes > 0) {
|
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__,
|
statsErrorFunc (conn, VIR_ERR_NO_SUPPORT, __FUNCTION__,
|
||||||
"stats->rd_bytes would overflow 64 bit counter",
|
"stats->rd_bytes would overflow 64 bit counter",
|
||||||
domid);
|
domid);
|
||||||
@ -209,7 +209,7 @@ read_bd_stats (virConnectPtr conn, xenUnifiedPrivatePtr priv,
|
|||||||
stats->rd_bytes *= 512;
|
stats->rd_bytes *= 512;
|
||||||
}
|
}
|
||||||
if (stats->wr_bytes > 0) {
|
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__,
|
statsErrorFunc (conn, VIR_ERR_NO_SUPPORT, __FUNCTION__,
|
||||||
"stats->wr_bytes would overflow 64 bit counter",
|
"stats->wr_bytes would overflow 64 bit counter",
|
||||||
domid);
|
domid);
|
||||||
|
Loading…
Reference in New Issue
Block a user