diff options
author | Eric Blake <eblake@redhat.com> | 2017-08-09 15:38:05 -0500 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2017-09-04 18:33:00 +0200 |
commit | 56439e9d55626b65ecb887f1ac3714652555312e (patch) | |
tree | 03e2b0ad124882d070c0648aacd01dfb5e0fcc5a /net | |
parent | f7cc69b326850c34db5dca2f9f74898cd181f43a (diff) |
qcow: Change signature of get_cluster_offset()
The old signature has an ambiguous meaning for a return of 0:
either no allocation was requested or necessary, or an error
occurred (but any errno associated with the error is lost to
the caller, which then has to assume EIO).
Better is to follow the example of qcow2, by changing the
signature to have a separate return value that cleanly
distinguishes between failure and success, along with a
parameter that cleanly holds a 64-bit value. Then update all
callers.
While auditing that all return paths return a negative errno
(rather than -1), I also simplified places where we can pass
NULL rather than a local Error that just gets thrown away.
Suggested-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions