Re: [Qemu-devel] [PATCH v5 05/26] qcow2: Use unsigned addend for update_refcount()

2015-01-22 Thread Eric Blake
On 12/15/2014 05:50 AM, Max Reitz wrote: > update_refcount() and qcow2_update_cluster_refcount() currently take a > signed addend. At least one caller passes a value directly derived from > an absolute refcount that should be reached ("l2_refcount - 1" in > expand_zero_clusters_in_l1()). Therefore,

[Qemu-devel] [PATCH v5 05/26] qcow2: Use unsigned addend for update_refcount()

2014-12-15 Thread Max Reitz
update_refcount() and qcow2_update_cluster_refcount() currently take a signed addend. At least one caller passes a value directly derived from an absolute refcount that should be reached ("l2_refcount - 1" in expand_zero_clusters_in_l1()). Therefore, the addend should be unsigned because unsigned o