]> git.ipfire.org Git - thirdparty/libvirt.git/commit
network: fix return value of hostsFileWrite
authorLaine Stump <laine@laine.org>
Wed, 27 Apr 2011 18:11:14 +0000 (14:11 -0400)
committerLaine Stump <laine@laine.org>
Thu, 28 Apr 2011 14:44:57 +0000 (10:44 -0400)
commitf7bd72fa260051a68392b50f2ca0d2ed3ef18e4f
tree43f58ecc983b534a1b649a5151a5fd23400ff6c0
parenta372c405b48359dc0a2daa00a1065ca5b75a47ef
network: fix return value of hostsFileWrite

The lone caller to hostsFileWrite (and the callers for at least 3
levels up the return stack) assume that the return value will be < 0
on failure. However, hostsFileWrite returns 0 on success, and a
positive errno on failure. This patch changes hostsFileWrite to return
-errno on failure.
src/util/dnsmasq.c