]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
bitmap: fix problems in previous commit
authorEric Blake <eblake@redhat.com>
Tue, 18 Sep 2012 23:20:03 +0000 (17:20 -0600)
committerEric Blake <eblake@redhat.com>
Tue, 18 Sep 2012 23:47:06 +0000 (17:47 -0600)
commitfd66ea669c131f660799bb6f9ea9988a17cd03ef
tree2b867eb99fa86f65b17feb57bd7396886ca542de
parent4bba6579cccb8e1423bc1a553fc1109845757b00
bitmap: fix problems in previous commit

Commit ee3d3893 missed the fact that (unsigned char)<<(int)
is truncated to int, and therefore failed for any bitmap data
longer than four bytes.

Also, I failed to run 'make syntax-check' on my commit 4bba6579;
for whatever odd reason, ffs lives in a different header than ffsl.

* src/util/bitmap.c (virBitmapNewData): Use correct shift type.
(includes): Glibc (and therefore gnulib) decided ffs is in
<strings.h>, but ffsl is in <string.h>.
* tests/virbitmaptest.c (test5): Test it.
src/util/bitmap.c
tests/virbitmaptest.c