Replace some occurrances of virDomainPtr domain; virNetworkPtr network; With virDomainPtr dom; virNetworkPtr net; * daemon/remote.c: Fix variable naming to follow standard --- daemon/remote.c | 194 +++++++++++++++++++++++++++--------------------------- 1 files changed, 97 insertions(+), 97 deletions(-) diff --git a/daemon/remote.c b/daemon/remote.c index 66df9f7..eb2727d 100644 --- a/daemon/remote.c +++ b/daemon/remote.c @@ -75,7 +75,7 @@ static virStoragePoolPtr get_nonnull_storage_pool(virConnectPtr conn, remote_non static virStorageVolPtr get_nonnull_storage_vol(virConnectPtr conn, remote_nonnull_storage_vol vol); static virSecretPtr get_nonnull_secret(virConnectPtr conn, remote_nonnull_secret secret); static virNWFilterPtr get_nonnull_nwfilter(virConnectPtr conn, remote_nonnull_nwfilter nwfilter); -static virDomainSnapshotPtr get_nonnull_domain_snapshot(virDomainPtr domain, remote_nonnull_domain_snapshot snapshot); +static virDomainSnapshotPtr get_nonnull_domain_snapshot(virDomainPtr dom, remote_nonnull_domain_snapshot snapshot); static void make_nonnull_domain(remote_nonnull_domain *dom_dst, virDomainPtr dom_src); static void make_nonnull_network(remote_nonnull_network *net_dst, virNetworkPtr net_src); static void make_nonnull_interface(remote_nonnull_interface *interface_dst, virInterfacePtr interface_src); @@ -2198,7 +2198,7 @@ remoteDispatchDomainMigrateFinish(struct qemud_server *server ATTRIBUTE_UNUSED, remote_domain_migrate_finish_args *args, remote_domain_migrate_finish_ret *ret) { - virDomainPtr ddom = NULL; + virDomainPtr dom = NULL; int rv = -1; if (!conn) { @@ -2206,21 +2206,21 @@ remoteDispatchDomainMigrateFinish(struct qemud_server *server ATTRIBUTE_UNUSED, goto cleanup; } - if (!(ddom = virDomainMigrateFinish(conn, args->dname, - args->cookie.cookie_val, - args->cookie.cookie_len, - args->uri, - args->flags))) + if (!(dom = virDomainMigrateFinish(conn, args->dname, + args->cookie.cookie_val, + args->cookie.cookie_len, + args->uri, + args->flags))) goto cleanup; - make_nonnull_domain(&ret->ddom, ddom); + make_nonnull_domain(&ret->ddom, dom); rv = 0; cleanup: if (rv < 0) remoteDispatchError(rerr); - if (ddom) - virDomainFree(ddom); + if (dom) + virDomainFree(dom); return rv; } @@ -2284,7 +2284,7 @@ remoteDispatchDomainMigrateFinish2(struct qemud_server *server ATTRIBUTE_UNUSED, remote_domain_migrate_finish2_args *args, remote_domain_migrate_finish2_ret *ret) { - virDomainPtr ddom = NULL; + virDomainPtr dom = NULL; int rv = -1; if (!conn) { @@ -2292,23 +2292,23 @@ remoteDispatchDomainMigrateFinish2(struct qemud_server *server ATTRIBUTE_UNUSED, goto cleanup; } - if (!(ddom = virDomainMigrateFinish2(conn, args->dname, - args->cookie.cookie_val, - args->cookie.cookie_len, - args->uri, - args->flags, - args->retcode))) + if (!(dom = virDomainMigrateFinish2(conn, args->dname, + args->cookie.cookie_val, + args->cookie.cookie_len, + args->uri, + args->flags, + args->retcode))) goto cleanup; - make_nonnull_domain(&ret->ddom, ddom); + make_nonnull_domain(&ret->ddom, dom); rv = 0; cleanup: if (rv < 0) remoteDispatchError(rerr); - if (ddom) - virDomainFree(ddom); + if (dom) + virDomainFree(dom); return rv; } @@ -7439,7 +7439,7 @@ static int remoteDispatchDomainIsActive(struct qemud_server *server ATTRIBUTE_UN remote_domain_is_active_args *args, remote_domain_is_active_ret *ret) { - virDomainPtr domain = NULL; + virDomainPtr dom = NULL; int rv = -1; if (!conn) { @@ -7447,10 +7447,10 @@ static int remoteDispatchDomainIsActive(struct qemud_server *server ATTRIBUTE_UN goto cleanup; } - if (!(domain = get_nonnull_domain(conn, args->dom))) + if (!(dom = get_nonnull_domain(conn, args->dom))) goto cleanup; - if ((ret->active = virDomainIsActive(domain)) < 0) + if ((ret->active = virDomainIsActive(dom)) < 0) goto cleanup; rv = 0; @@ -7458,8 +7458,8 @@ static int remoteDispatchDomainIsActive(struct qemud_server *server ATTRIBUTE_UN cleanup: if (rv < 0) remoteDispatchError(rerr); - if (domain) - virDomainFree(domain); + if (dom) + virDomainFree(dom); return rv; } @@ -7471,7 +7471,7 @@ static int remoteDispatchDomainIsPersistent(struct qemud_server *server ATTRIBUT remote_domain_is_persistent_args *args, remote_domain_is_persistent_ret *ret) { - virDomainPtr domain = NULL; + virDomainPtr dom = NULL; int rv = -1; if (!conn) { @@ -7479,10 +7479,10 @@ static int remoteDispatchDomainIsPersistent(struct qemud_server *server ATTRIBUT goto cleanup; } - if (!(domain = get_nonnull_domain(conn, args->dom))) + if (!(dom = get_nonnull_domain(conn, args->dom))) goto cleanup; - if ((ret->persistent = virDomainIsPersistent(domain)) < 0) + if ((ret->persistent = virDomainIsPersistent(dom)) < 0) goto cleanup; rv = 0; @@ -7490,8 +7490,8 @@ static int remoteDispatchDomainIsPersistent(struct qemud_server *server ATTRIBUT cleanup: if (rv < 0) remoteDispatchError(rerr); - if (domain) - virDomainFree(domain); + if (dom) + virDomainFree(dom); return rv; } @@ -7503,7 +7503,7 @@ static int remoteDispatchDomainIsUpdated(struct qemud_server *server ATTRIBUTE_U remote_domain_is_updated_args *args, remote_domain_is_updated_ret *ret) { - virDomainPtr domain = NULL; + virDomainPtr dom = NULL; int rv = -1; if (!conn) { @@ -7511,10 +7511,10 @@ static int remoteDispatchDomainIsUpdated(struct qemud_server *server ATTRIBUTE_U goto cleanup; } - if (!(domain = get_nonnull_domain(conn, args->dom))) + if (!(dom = get_nonnull_domain(conn, args->dom))) goto cleanup; - if ((ret->updated = virDomainIsUpdated(domain)) < 0) + if ((ret->updated = virDomainIsUpdated(dom)) < 0) goto cleanup; rv = 0; @@ -7522,8 +7522,8 @@ static int remoteDispatchDomainIsUpdated(struct qemud_server *server ATTRIBUTE_U cleanup: if (rv < 0) remoteDispatchError(rerr); - if (domain) - virDomainFree(domain); + if (dom) + virDomainFree(dom); return rv; } @@ -7567,7 +7567,7 @@ static int remoteDispatchNetworkIsActive(struct qemud_server *server ATTRIBUTE_U remote_network_is_active_args *args, remote_network_is_active_ret *ret) { - virNetworkPtr network = NULL; + virNetworkPtr net = NULL; int rv = -1; if (!conn) { @@ -7575,10 +7575,10 @@ static int remoteDispatchNetworkIsActive(struct qemud_server *server ATTRIBUTE_U goto cleanup; } - if (!(network = get_nonnull_network(conn, args->net))) + if (!(net = get_nonnull_network(conn, args->net))) goto cleanup; - if ((ret->active = virNetworkIsActive(network)) < 0) + if ((ret->active = virNetworkIsActive(net)) < 0) goto cleanup; rv = 0; @@ -7586,8 +7586,8 @@ static int remoteDispatchNetworkIsActive(struct qemud_server *server ATTRIBUTE_U cleanup: if (rv < 0) remoteDispatchError(rerr); - if (network) - virNetworkFree(network); + if (net) + virNetworkFree(net); return rv; } @@ -7599,7 +7599,7 @@ static int remoteDispatchNetworkIsPersistent(struct qemud_server *server ATTRIBU remote_network_is_persistent_args *args, remote_network_is_persistent_ret *ret) { - virNetworkPtr network = NULL; + virNetworkPtr net = NULL; int rv = -1; if (!conn) { @@ -7607,10 +7607,10 @@ static int remoteDispatchNetworkIsPersistent(struct qemud_server *server ATTRIBU goto cleanup; } - if (!(network = get_nonnull_network(conn, args->net))) + if (!(net = get_nonnull_network(conn, args->net))) goto cleanup; - if ((ret->persistent = virNetworkIsPersistent(network)) < 0) + if ((ret->persistent = virNetworkIsPersistent(net)) < 0) goto cleanup; rv = 0; @@ -7618,8 +7618,8 @@ static int remoteDispatchNetworkIsPersistent(struct qemud_server *server ATTRIBU cleanup: if (rv < 0) remoteDispatchError(rerr); - if (network) - virNetworkFree(network); + if (net) + virNetworkFree(net); return rv; } @@ -7937,7 +7937,7 @@ remoteDispatchDomainSnapshotCreateXml(struct qemud_server *server ATTRIBUTE_UNUS remote_domain_snapshot_create_xml_ret *ret) { virDomainSnapshotPtr snapshot; - virDomainPtr domain = NULL; + virDomainPtr dom = NULL; int rv = -1; if (!conn) { @@ -7945,10 +7945,10 @@ remoteDispatchDomainSnapshotCreateXml(struct qemud_server *server ATTRIBUTE_UNUS goto cleanup; } - if (!(domain = get_nonnull_domain(conn, args->domain))) + if (!(dom = get_nonnull_domain(conn, args->domain))) goto cleanup; - if (!(snapshot = virDomainSnapshotCreateXML(domain, args->xml_desc, args->flags))) + if (!(snapshot = virDomainSnapshotCreateXML(dom, args->xml_desc, args->flags))) goto cleanup; make_nonnull_domain_snapshot(&ret->snap, snapshot); @@ -7960,8 +7960,8 @@ cleanup: remoteDispatchError(rerr); if (snapshot) virDomainSnapshotFree(snapshot); - if (domain) - virDomainFree(domain); + if (dom) + virDomainFree(dom); return rv; } @@ -7974,7 +7974,7 @@ remoteDispatchDomainSnapshotDumpXml(struct qemud_server *server ATTRIBUTE_UNUSED remote_domain_snapshot_dump_xml_args *args, remote_domain_snapshot_dump_xml_ret *ret) { - virDomainPtr domain = NULL; + virDomainPtr dom = NULL; virDomainSnapshotPtr snapshot = NULL; int rv = -1; @@ -7983,10 +7983,10 @@ remoteDispatchDomainSnapshotDumpXml(struct qemud_server *server ATTRIBUTE_UNUSED goto cleanup; } - if (!(domain = get_nonnull_domain(conn, args->snap.domain))) + if (!(dom = get_nonnull_domain(conn, args->snap.domain))) goto cleanup; - if (!(snapshot = get_nonnull_domain_snapshot(domain, args->snap))) + if (!(snapshot = get_nonnull_domain_snapshot(dom, args->snap))) goto cleanup; /* remoteDispatchClientRequest will free this. */ @@ -8000,8 +8000,8 @@ cleanup: remoteDispatchError(rerr); if (snapshot) virDomainSnapshotFree(snapshot); - if (domain) - virDomainFree(domain); + if (dom) + virDomainFree(dom); return rv; } @@ -8014,7 +8014,7 @@ remoteDispatchDomainSnapshotNum(struct qemud_server *server ATTRIBUTE_UNUSED, remote_domain_snapshot_num_args *args, remote_domain_snapshot_num_ret *ret) { - virDomainPtr domain = NULL; + virDomainPtr dom = NULL; int rv = -1; if (!conn) { @@ -8022,10 +8022,10 @@ remoteDispatchDomainSnapshotNum(struct qemud_server *server ATTRIBUTE_UNUSED, goto cleanup; } - if (!(domain = get_nonnull_domain(conn, args->domain))) + if (!(dom = get_nonnull_domain(conn, args->domain))) goto cleanup; - if ((ret->num = virDomainSnapshotNum(domain, args->flags)) < 0) + if ((ret->num = virDomainSnapshotNum(dom, args->flags)) < 0) goto cleanup; rv = 0; @@ -8033,8 +8033,8 @@ remoteDispatchDomainSnapshotNum(struct qemud_server *server ATTRIBUTE_UNUSED, cleanup: if (rv < 0) remoteDispatchError(rerr); - if (domain) - virDomainFree(domain); + if (dom) + virDomainFree(dom); return rv; } @@ -8047,7 +8047,7 @@ remoteDispatchDomainSnapshotListNames(struct qemud_server *server ATTRIBUTE_UNUS remote_domain_snapshot_list_names_args *args, remote_domain_snapshot_list_names_ret *ret) { - virDomainPtr domain = NULL; + virDomainPtr dom = NULL; int rv = -1; int len; @@ -8062,7 +8062,7 @@ remoteDispatchDomainSnapshotListNames(struct qemud_server *server ATTRIBUTE_UNUS goto cleanup; } - if (!(domain = get_nonnull_domain(conn, args->domain))) + if (!(dom = get_nonnull_domain(conn, args->domain))) goto cleanup; /* Allocate return buffer. */ @@ -8071,7 +8071,7 @@ remoteDispatchDomainSnapshotListNames(struct qemud_server *server ATTRIBUTE_UNUS goto cleanup; } - len = virDomainSnapshotListNames(domain, + len = virDomainSnapshotListNames(dom, ret->names.names_val, args->nameslen, args->flags); @@ -8086,8 +8086,8 @@ cleanup: remoteDispatchError(rerr); VIR_FREE(ret->names.names_val); } - if (domain) - virDomainFree(domain); + if (dom) + virDomainFree(dom); return rv; } @@ -8101,7 +8101,7 @@ remoteDispatchDomainSnapshotLookupByName(struct qemud_server *server ATTRIBUTE_U remote_domain_snapshot_lookup_by_name_ret *ret) { virDomainSnapshotPtr snapshot; - virDomainPtr domain = NULL; + virDomainPtr dom = NULL; int rv = -1; if (!conn) { @@ -8109,10 +8109,10 @@ remoteDispatchDomainSnapshotLookupByName(struct qemud_server *server ATTRIBUTE_U goto cleanup; } - if (!(domain = get_nonnull_domain(conn, args->domain))) + if (!(dom = get_nonnull_domain(conn, args->domain))) goto cleanup; - if (!(snapshot = virDomainSnapshotLookupByName(domain, args->name, args->flags))) + if (!(snapshot = virDomainSnapshotLookupByName(dom, args->name, args->flags))) goto cleanup; make_nonnull_domain_snapshot(&ret->snap, snapshot); @@ -8124,8 +8124,8 @@ cleanup: remoteDispatchError(rerr); if (snapshot) virDomainSnapshotFree(snapshot); - if (domain) - virDomainFree(domain); + if (dom) + virDomainFree(dom); return rv; } @@ -8138,7 +8138,7 @@ remoteDispatchDomainHasCurrentSnapshot(struct qemud_server *server ATTRIBUTE_UNU remote_domain_has_current_snapshot_args *args, remote_domain_has_current_snapshot_ret *ret) { - virDomainPtr domain = NULL; + virDomainPtr dom = NULL; int result; int rv = -1; @@ -8147,10 +8147,10 @@ remoteDispatchDomainHasCurrentSnapshot(struct qemud_server *server ATTRIBUTE_UNU goto cleanup; } - if (!(domain = get_nonnull_domain(conn, args->domain))) + if (!(dom = get_nonnull_domain(conn, args->domain))) goto cleanup; - result = virDomainHasCurrentSnapshot(domain, args->flags); + result = virDomainHasCurrentSnapshot(dom, args->flags); if (result < 0) goto cleanup; @@ -8161,8 +8161,8 @@ remoteDispatchDomainHasCurrentSnapshot(struct qemud_server *server ATTRIBUTE_UNU cleanup: if (rv < 0) remoteDispatchError(rerr); - if (domain) - virDomainFree(domain); + if (dom) + virDomainFree(dom); return rv; } @@ -8176,7 +8176,7 @@ remoteDispatchDomainSnapshotCurrent(struct qemud_server *server ATTRIBUTE_UNUSED remote_domain_snapshot_current_ret *ret) { virDomainSnapshotPtr snapshot; - virDomainPtr domain = NULL; + virDomainPtr dom = NULL; int rv = -1; if (!conn) { @@ -8184,10 +8184,10 @@ remoteDispatchDomainSnapshotCurrent(struct qemud_server *server ATTRIBUTE_UNUSED goto cleanup; } - if (!(domain = get_nonnull_domain(conn, args->domain))) + if (!(dom = get_nonnull_domain(conn, args->domain))) goto cleanup; - if (!(snapshot = virDomainSnapshotCurrent(domain, args->flags))) + if (!(snapshot = virDomainSnapshotCurrent(dom, args->flags))) goto cleanup; make_nonnull_domain_snapshot(&ret->snap, snapshot); @@ -8199,8 +8199,8 @@ cleanup: remoteDispatchError(rerr); if (snapshot) virDomainSnapshotFree(snapshot); - if (domain) - virDomainFree(domain); + if (dom) + virDomainFree(dom); return rv; } @@ -8213,7 +8213,7 @@ remoteDispatchDomainRevertToSnapshot(struct qemud_server *server ATTRIBUTE_UNUSE remote_domain_revert_to_snapshot_args *args, void *ret ATTRIBUTE_UNUSED) { - virDomainPtr domain = NULL; + virDomainPtr dom = NULL; virDomainSnapshotPtr snapshot = NULL; int rv = -1; @@ -8222,10 +8222,10 @@ remoteDispatchDomainRevertToSnapshot(struct qemud_server *server ATTRIBUTE_UNUSE goto cleanup; } - if (!(domain = get_nonnull_domain(conn, args->snap.domain))) + if (!(dom = get_nonnull_domain(conn, args->snap.domain))) goto cleanup; - if (!(snapshot = get_nonnull_domain_snapshot(domain, args->snap))) + if (!(snapshot = get_nonnull_domain_snapshot(dom, args->snap))) goto cleanup; if (virDomainRevertToSnapshot(snapshot, args->flags) < 0) @@ -8238,8 +8238,8 @@ cleanup: remoteDispatchError(rerr); if (snapshot) virDomainSnapshotFree(snapshot); - if (domain) - virDomainFree(domain); + if (dom) + virDomainFree(dom); return rv; } @@ -8252,7 +8252,7 @@ remoteDispatchDomainSnapshotDelete(struct qemud_server *server ATTRIBUTE_UNUSED, remote_domain_snapshot_delete_args *args, void *ret ATTRIBUTE_UNUSED) { - virDomainPtr domain = NULL; + virDomainPtr dom = NULL; virDomainSnapshotPtr snapshot = NULL; int rv = -1; @@ -8261,10 +8261,10 @@ remoteDispatchDomainSnapshotDelete(struct qemud_server *server ATTRIBUTE_UNUSED, goto cleanup; } - if (!(domain = get_nonnull_domain(conn, args->snap.domain))) + if (!(dom = get_nonnull_domain(conn, args->snap.domain))) goto cleanup; - if (!(snapshot = get_nonnull_domain_snapshot(domain, args->snap))) + if (!(snapshot = get_nonnull_domain_snapshot(dom, args->snap))) goto cleanup; if (virDomainSnapshotDelete(snapshot, args->flags) < 0) @@ -8277,8 +8277,8 @@ cleanup: remoteDispatchError(rerr); if (snapshot) virDomainSnapshotFree(snapshot); - if (domain) - virDomainFree(domain); + if (dom) + virDomainFree(dom); return rv; } @@ -8658,7 +8658,7 @@ qemuDispatchMonitorCommand(struct qemud_server *server ATTRIBUTE_UNUSED, qemu_monitor_command_args *args, qemu_monitor_command_ret *ret) { - virDomainPtr domain = NULL; + virDomainPtr dom = NULL; int rv = -1; if (!conn) { @@ -8666,10 +8666,10 @@ qemuDispatchMonitorCommand(struct qemud_server *server ATTRIBUTE_UNUSED, goto cleanup; } - if (!(domain = get_nonnull_domain(conn, args->domain))) + if (!(dom = get_nonnull_domain(conn, args->domain))) goto cleanup; - if (virDomainQemuMonitorCommand(domain, args->cmd, &ret->result, + if (virDomainQemuMonitorCommand(dom, args->cmd, &ret->result, args->flags) < 0) goto cleanup; @@ -8678,8 +8678,8 @@ qemuDispatchMonitorCommand(struct qemud_server *server ATTRIBUTE_UNUSED, cleanup: if (rv < 0) remoteDispatchError(rerr); - if (domain) - virDomainFree(domain); + if (dom) + virDomainFree(dom); return rv; } @@ -8793,9 +8793,9 @@ get_nonnull_nwfilter(virConnectPtr conn, remote_nonnull_nwfilter nwfilter) } static virDomainSnapshotPtr -get_nonnull_domain_snapshot(virDomainPtr domain, remote_nonnull_domain_snapshot snapshot) +get_nonnull_domain_snapshot(virDomainPtr dom, remote_nonnull_domain_snapshot snapshot) { - return virGetDomainSnapshot(domain, snapshot.name); + return virGetDomainSnapshot(dom, snapshot.name); } /* Make remote_nonnull_domain and remote_nonnull_network. */ -- 1.7.4.2 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list