summaryrefslogtreecommitdiff
path: root/block/qcow2.h
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2010-02-02 15:20:57 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2010-02-10 11:56:57 -0600
commitf4f0d391b26afcce86df85566788be7170127116 (patch)
treebb2d572543f24e5dd830cb7bad19c17100fc8dd6 /block/qcow2.h
parent9bc378c1430d0c227a8463501b6e0d03cf09adac (diff)
downloadqemu-f4f0d391b26afcce86df85566788be7170127116.tar.gz
qcow2: Fix signedness bugs
Checking for return codes < 0 isn't really going to work with unsigned types. Use signed types instead. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'block/qcow2.h')
-rw-r--r--block/qcow2.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/block/qcow2.h b/block/qcow2.h
index d9ea6abc50..de9397a3d3 100644
--- a/block/qcow2.h
+++ b/block/qcow2.h
@@ -192,10 +192,8 @@ void qcow2_encrypt_sectors(BDRVQcowState *s, int64_t sector_num,
uint64_t qcow2_get_cluster_offset(BlockDriverState *bs, uint64_t offset,
int *num);
-uint64_t qcow2_alloc_cluster_offset(BlockDriverState *bs,
- uint64_t offset,
- int n_start, int n_end,
- int *num, QCowL2Meta *m);
+int qcow2_alloc_cluster_offset(BlockDriverState *bs, uint64_t offset,
+ int n_start, int n_end, int *num, QCowL2Meta *m);
uint64_t qcow2_alloc_compressed_cluster_offset(BlockDriverState *bs,
uint64_t offset,
int compressed_size);