mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-30 09:53:10 +00:00
Remove unused uuidstr variable from datatypes.c
Several APIs in src/datatypes.c were formatting an UUID to a uuidstr variable and then not using it.
This commit is contained in:
parent
0c9fd4cfe9
commit
03be7ab586
@ -173,7 +173,6 @@ virUnrefConnect(virConnectPtr conn) {
|
|||||||
virDomainPtr
|
virDomainPtr
|
||||||
virGetDomain(virConnectPtr conn, const char *name, const unsigned char *uuid) {
|
virGetDomain(virConnectPtr conn, const char *name, const unsigned char *uuid) {
|
||||||
virDomainPtr ret = NULL;
|
virDomainPtr ret = NULL;
|
||||||
char uuidstr[VIR_UUID_STRING_BUFLEN];
|
|
||||||
|
|
||||||
if (!VIR_IS_CONNECT(conn)) {
|
if (!VIR_IS_CONNECT(conn)) {
|
||||||
virLibConnError(VIR_ERR_INVALID_CONN, "%s", _("no connection"));
|
virLibConnError(VIR_ERR_INVALID_CONN, "%s", _("no connection"));
|
||||||
@ -184,8 +183,6 @@ virGetDomain(virConnectPtr conn, const char *name, const unsigned char *uuid) {
|
|||||||
|
|
||||||
virMutexLock(&conn->lock);
|
virMutexLock(&conn->lock);
|
||||||
|
|
||||||
virUUIDFormat(uuid, uuidstr);
|
|
||||||
|
|
||||||
if (VIR_ALLOC(ret) < 0) {
|
if (VIR_ALLOC(ret) < 0) {
|
||||||
virMutexUnlock(&conn->lock);
|
virMutexUnlock(&conn->lock);
|
||||||
virReportOOMError();
|
virReportOOMError();
|
||||||
@ -301,7 +298,6 @@ virUnrefDomain(virDomainPtr domain) {
|
|||||||
virNetworkPtr
|
virNetworkPtr
|
||||||
virGetNetwork(virConnectPtr conn, const char *name, const unsigned char *uuid) {
|
virGetNetwork(virConnectPtr conn, const char *name, const unsigned char *uuid) {
|
||||||
virNetworkPtr ret = NULL;
|
virNetworkPtr ret = NULL;
|
||||||
char uuidstr[VIR_UUID_STRING_BUFLEN];
|
|
||||||
|
|
||||||
if (!VIR_IS_CONNECT(conn)) {
|
if (!VIR_IS_CONNECT(conn)) {
|
||||||
virLibConnError(VIR_ERR_INVALID_CONN, "%s", _("no connection"));
|
virLibConnError(VIR_ERR_INVALID_CONN, "%s", _("no connection"));
|
||||||
@ -312,8 +308,6 @@ virGetNetwork(virConnectPtr conn, const char *name, const unsigned char *uuid) {
|
|||||||
|
|
||||||
virMutexLock(&conn->lock);
|
virMutexLock(&conn->lock);
|
||||||
|
|
||||||
virUUIDFormat(uuid, uuidstr);
|
|
||||||
|
|
||||||
if (VIR_ALLOC(ret) < 0) {
|
if (VIR_ALLOC(ret) < 0) {
|
||||||
virMutexUnlock(&conn->lock);
|
virMutexUnlock(&conn->lock);
|
||||||
virReportOOMError();
|
virReportOOMError();
|
||||||
@ -562,7 +556,6 @@ virStoragePoolPtr
|
|||||||
virGetStoragePool(virConnectPtr conn, const char *name,
|
virGetStoragePool(virConnectPtr conn, const char *name,
|
||||||
const unsigned char *uuid) {
|
const unsigned char *uuid) {
|
||||||
virStoragePoolPtr ret = NULL;
|
virStoragePoolPtr ret = NULL;
|
||||||
char uuidstr[VIR_UUID_STRING_BUFLEN];
|
|
||||||
|
|
||||||
if (!VIR_IS_CONNECT(conn)) {
|
if (!VIR_IS_CONNECT(conn)) {
|
||||||
virLibConnError(VIR_ERR_INVALID_CONN, "%s", _("no connection"));
|
virLibConnError(VIR_ERR_INVALID_CONN, "%s", _("no connection"));
|
||||||
@ -573,8 +566,6 @@ virGetStoragePool(virConnectPtr conn, const char *name,
|
|||||||
|
|
||||||
virMutexLock(&conn->lock);
|
virMutexLock(&conn->lock);
|
||||||
|
|
||||||
virUUIDFormat(uuid, uuidstr);
|
|
||||||
|
|
||||||
if (VIR_ALLOC(ret) < 0) {
|
if (VIR_ALLOC(ret) < 0) {
|
||||||
virMutexUnlock(&conn->lock);
|
virMutexUnlock(&conn->lock);
|
||||||
virReportOOMError();
|
virReportOOMError();
|
||||||
@ -946,7 +937,6 @@ virGetSecret(virConnectPtr conn, const unsigned char *uuid,
|
|||||||
int usageType, const char *usageID)
|
int usageType, const char *usageID)
|
||||||
{
|
{
|
||||||
virSecretPtr ret = NULL;
|
virSecretPtr ret = NULL;
|
||||||
char uuidstr[VIR_UUID_STRING_BUFLEN];
|
|
||||||
|
|
||||||
if (!VIR_IS_CONNECT(conn)) {
|
if (!VIR_IS_CONNECT(conn)) {
|
||||||
virLibConnError(VIR_ERR_INVALID_CONN, "%s", _("no connection"));
|
virLibConnError(VIR_ERR_INVALID_CONN, "%s", _("no connection"));
|
||||||
@ -957,8 +947,6 @@ virGetSecret(virConnectPtr conn, const unsigned char *uuid,
|
|||||||
|
|
||||||
virMutexLock(&conn->lock);
|
virMutexLock(&conn->lock);
|
||||||
|
|
||||||
virUUIDFormat(uuid, uuidstr);
|
|
||||||
|
|
||||||
if (VIR_ALLOC(ret) < 0) {
|
if (VIR_ALLOC(ret) < 0) {
|
||||||
virMutexUnlock(&conn->lock);
|
virMutexUnlock(&conn->lock);
|
||||||
virReportOOMError();
|
virReportOOMError();
|
||||||
@ -1128,7 +1116,6 @@ int virUnrefStream(virStreamPtr st) {
|
|||||||
virNWFilterPtr
|
virNWFilterPtr
|
||||||
virGetNWFilter(virConnectPtr conn, const char *name, const unsigned char *uuid) {
|
virGetNWFilter(virConnectPtr conn, const char *name, const unsigned char *uuid) {
|
||||||
virNWFilterPtr ret = NULL;
|
virNWFilterPtr ret = NULL;
|
||||||
char uuidstr[VIR_UUID_STRING_BUFLEN];
|
|
||||||
|
|
||||||
if (!VIR_IS_CONNECT(conn)) {
|
if (!VIR_IS_CONNECT(conn)) {
|
||||||
virLibConnError(VIR_ERR_INVALID_CONN, "%s", _("no connection"));
|
virLibConnError(VIR_ERR_INVALID_CONN, "%s", _("no connection"));
|
||||||
@ -1139,8 +1126,6 @@ virGetNWFilter(virConnectPtr conn, const char *name, const unsigned char *uuid)
|
|||||||
|
|
||||||
virMutexLock(&conn->lock);
|
virMutexLock(&conn->lock);
|
||||||
|
|
||||||
virUUIDFormat(uuid, uuidstr);
|
|
||||||
|
|
||||||
if (VIR_ALLOC(ret) < 0) {
|
if (VIR_ALLOC(ret) < 0) {
|
||||||
virMutexUnlock(&conn->lock);
|
virMutexUnlock(&conn->lock);
|
||||||
virReportOOMError();
|
virReportOOMError();
|
||||||
|
Loading…
Reference in New Issue
Block a user