]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Remove erroneous setting of return value to errno.
authorLaine Stump <laine@laine.org>
Mon, 19 Jul 2010 23:52:57 +0000 (19:52 -0400)
committerLaine Stump <laine@laine.org>
Wed, 21 Jul 2010 21:32:19 +0000 (17:32 -0400)
commitae3d31bf4f3ada5cfbe43891a133e8697755bb99
treea7ccf2b769000576912872213228d15d7087a5ba
parent3e0f05fc4c7334fd07792b4f5173457985daa8ff
Remove erroneous setting of return value to errno.

One error exit in virStorageBackendCreateBlockFrom was setting the
return value to errno. The convention for volume build functions is to
return 0 on success or -1 on failure. Not only was it not necessary to
set the return value (it defaults to -1, and is set to 0 when
everything has been successfully completed), in the case that some
caller were checking for < 0 rather than != 0, they would incorrectly
believe that it completed successfully.
src/storage/storage_backend.c