[gnome-boxes] libvirt-broker: avoid empty returns in non-void methods
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] libvirt-broker: avoid empty returns in non-void methods
- Date: Mon, 29 Jan 2018 12:36:34 +0000 (UTC)
commit a405a0f8610c4843cbdc07d59c6071870b7cb223
Author: Ernestas Kulik <ernestask gnome org>
Date: Sat Jan 27 15:53:40 2018 +0200
libvirt-broker: avoid empty returns in non-void methods
In the spirit of https://bugzilla.gnome.org/show_bug.cgi?id=792942,
Clang turned these into hard errors.
src/libvirt-broker.vala | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/libvirt-broker.vala b/src/libvirt-broker.vala
index 831dcde5..2ea89cd8 100644
--- a/src/libvirt-broker.vala
+++ b/src/libvirt-broker.vala
@@ -20,13 +20,13 @@ private LibvirtBroker () {
}
public GVir.Connection get_connection (string name) {
- return_if_fail (broker != null);
+ return_val_if_fail (broker != null, null);
return broker.connections.get (name);
}
public async LibvirtMachine add_domain (CollectionSource source, GVir.Connection connection, GVir.Domain
domain)
throws GLib.Error {
- return_if_fail (broker != null);
+ return_val_if_fail (broker != null, null);
if (pending_domains.find (domain) != null) {
// Already being added asychronously
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]