diff options
author | Max Reitz <mreitz@redhat.com> | 2014-05-29 00:19:54 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2014-08-15 15:07:16 +0200 |
commit | 8fcffa9853473ab148d36858f15c5531161a1824 (patch) | |
tree | b844c551834c0cf1bc1960ce0f751d1cc6a348e0 /iothread.c | |
parent | 7504edf477d2bac9cbf53225811ec595abf045e4 (diff) |
qcow2: Return useful error code in refcount_init()
If bdrv_pread() returns an error, it is very unlikely that it was
ENOMEM. In this case, the return value should be passed along; as
bdrv_pread() will always either return the number of bytes read or a
negative value (the error code), the condition for checking whether
bdrv_pread() failed can be simplified (and clarified) as well.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
Diffstat (limited to 'iothread.c')
0 files changed, 0 insertions, 0 deletions