From cb873e9d15c5fae1c0557cb07688894e72062c75 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Mon, 17 Mar 2014 15:47:45 +0000 Subject: [PATCH] Fix mistakes in checking return values Thre was a syntax error in checking virRegisterStateDriver in the remote driver, and bogus checking of a void return type of virDomainConfNWFilterRegister in nwfilter. Signed-off-by: Daniel P. Berrange --- src/nwfilter/nwfilter_driver.c | 3 +-- src/remote/remote_driver.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/nwfilter/nwfilter_driver.c b/src/nwfilter/nwfilter_driver.c index 228794de77..8ce2b7df83 100644 --- a/src/nwfilter/nwfilter_driver.c +++ b/src/nwfilter/nwfilter_driver.c @@ -720,7 +720,6 @@ int nwfilterRegister(void) { return -1; if (virRegisterStateDriver(&stateDriver) < 0) return -1; - if (virDomainConfNWFilterRegister(&domainNWFilterDriver) < 0) - return -1; + virDomainConfNWFilterRegister(&domainNWFilterDriver); return 0; } diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index c9711bbd1c..e85f34df44 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -7840,7 +7840,7 @@ remoteRegister(void) if (virRegisterNWFilterDriver(&nwfilter_driver) < 0) return -1; #ifdef WITH_LIBVIRTD - if (virRegisterStateDriver(&state_driver) == -1) < 0) + if (virRegisterStateDriver(&state_driver) < 0) return -1; #endif -- GitLab