[libvirt] [PATCH] network: Remove unnecessary check in networkRadvdConfContents
Hongwei Bi
hwbi2008 at gmail.com
Tue Oct 15 14:37:20 UTC 2013
Since there is a check on configbuf through virBufferError(),
it is not necessary to check configstr and report OOM again.
Signed-off-by: Hongwei Bi <hwbi2008 at gmail.com>
---
src/network/bridge_driver.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index 8787bdb..ec40e0c 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -1312,10 +1312,7 @@ networkRadvdConfContents(virNetworkObjPtr network, char **configstr)
virReportOOMError();
goto cleanup;
}
- if (!(*configstr = virBufferContentAndReset(&configbuf))) {
- virReportOOMError();
- goto cleanup;
- }
+ *configstr = virBufferContentAndReset(&configbuf);
}
ret = 0;
--
1.8.1.2
More information about the libvir-list
mailing list