On 11/26/2014 05:43 AM, Max Reitz wrote: > On 2014-11-25 at 20:46, John Snow wrote: >> From: Fam Zheng >> >> Signed-off-by: Fam Zheng >> Signed-off-by: John Snow >> --- >> block.c | 35 +++++++++++++++++++++++++++++++---- >> include/block/block.h | 4 ++++ >> 2 files changed, 35 insertions(+), 4 deletions(-) >> >> @@ -5406,7 +5431,9 @@ int64_t >> bdrv_dbm_calc_def_granularity(BlockDriverState *bs) >> int64_t bdrv_dirty_bitmap_granularity(BlockDriverState *bs, >> BdrvDirtyBitmap *bitmap) >> { >> - return BDRV_SECTOR_SIZE << hbitmap_granularity(bitmap->bitmap); >> + g_assert(BDRV_SECTOR_SIZE << hbitmap_granularity(bitmap->bitmap) >> == \ >> + bitmap->granularity); > > Do you really need that backslash? > > If you don't and remove it, or if you do and keep it, and with either > "name ? g_strdup(name) : NULL" left as-is or replace by "g_strdup(name)": > g_strdup(NULL) is safe, so 'name ? g_strdup(name) : NULL' is pointless and can be written as 'g_strdup(name)' with no change in functionality. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org