From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50195) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Svqng-0007dV-Eu for qemu-devel@nongnu.org; Mon, 30 Jul 2012 10:18:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SvqnY-0005xf-Sc for qemu-devel@nongnu.org; Mon, 30 Jul 2012 10:18:24 -0400 Received: from mail-yx0-f173.google.com ([209.85.213.173]:50352) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SvqnY-0005xY-Od for qemu-devel@nongnu.org; Mon, 30 Jul 2012 10:18:16 -0400 Received: by yenl1 with SMTP id l1so4725088yen.4 for ; Mon, 30 Jul 2012 07:18:16 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <501697A0.1050207@redhat.com> Date: Mon, 30 Jul 2012 16:18:08 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1343127865-16608-1-git-send-email-pbonzini@redhat.com> <1343127865-16608-38-git-send-email-pbonzini@redhat.com> <5013E89C.7080903@redhat.com> <50168E84.7050101@redhat.com> In-Reply-To: <50168E84.7050101@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 37/47] add hierarchical bitmap data type and test cases List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, jcody@redhat.com, Eric Blake , qemu-devel@nongnu.org, stefanha@linux.vnet.ibm.com Il 30/07/2012 15:39, Paolo Bonzini ha scritto: >>> +HBitmap *hbitmap_alloc(uint64_t size, int granularity) >>> >> +{ >>> >> + HBitmap *hb = g_malloc0(sizeof(struct HBitmap)); >>> >> + int i; >>> >> + >>> >> + assert(granularity >= 0 && granularity < 64); >> > >> > Shouldn't this be granularity < BITS_PER_LONG? > Yep, thanks. > Actually, no. granularity is always applied to int64_t/uint64_t values. Paolo