Let's be sure we can get a Daemon object before the server object.
This is a more "orderly" way to do things since the svr object would
be added to the dmn object afterwards.
goto cleanup;
}
+ if (!(dmn = virNetDaemonNew())) {
+ ret = VIR_DAEMON_ERR_INIT;
+ goto cleanup;
+ }
+
if (!(srv = virNetServerNew("libvirtd", 1,
config->min_workers,
config->max_workers,
goto cleanup;
}
- if (!(dmn = virNetDaemonNew()) ||
- virNetDaemonAddServer(dmn, srv) < 0) {
+ if (virNetDaemonAddServer(dmn, srv) < 0) {
ret = VIR_DAEMON_ERR_INIT;
goto cleanup;
}