From: Max Reitz <mreitz@redhat.com>
To: qemu-block@nongnu.org
Cc: qemu-devel@nongnu.org, Max Reitz <mreitz@redhat.com>,
Fam Zheng <famz@redhat.com>, John Snow <jsnow@redhat.com>
Subject: [Qemu-devel] [PATCH for-2.8] hbitmap: Fix the serialization granularity's type
Date: Mon, 7 Nov 2016 17:39:21 +0100 [thread overview]
Message-ID: <20161107163921.699-1-mreitz@redhat.com> (raw)
This function returns a uint64_t, so it should not truncate its result
by performing a plain int calculation.
Signed-off-by: Max Reitz <mreitz@redhat.com>
---
util/hbitmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/util/hbitmap.c b/util/hbitmap.c
index 5d1a21c..c57be76 100644
--- a/util/hbitmap.c
+++ b/util/hbitmap.c
@@ -401,7 +401,7 @@ uint64_t hbitmap_serialization_granularity(const HBitmap *hb)
{
/* Require at least 64 bit granularity to be safe on both 64 bit and 32 bit
* hosts. */
- return 64 << hb->granularity;
+ return UINT64_C(64) << hb->granularity;
}
/* Start should be aligned to serialization granularity, chunk size should be
--
2.10.2
next reply other threads:[~2016-11-07 16:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-07 16:39 Max Reitz [this message]
2016-11-08 16:36 ` [Qemu-devel] [Qemu-block] [PATCH for-2.8] hbitmap: Fix the serialization granularity's type Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161107163921.699-1-mreitz@redhat.com \
--to=mreitz@redhat.com \
--cc=famz@redhat.com \
--cc=jsnow@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).