[PATCH 04/13] Remove unused uuidstr variable from datatypes.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>

Several APIs in src/datatypes.c were formatting an UUID to a
uuidstr variable and then not using it.
---
 src/datatypes.c |   15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/src/datatypes.c b/src/datatypes.c
index f1f6e61..343ee0d 100644
--- a/src/datatypes.c
+++ b/src/datatypes.c
@@ -173,7 +173,6 @@ virUnrefConnect(virConnectPtr conn) {
 virDomainPtr
 virGetDomain(virConnectPtr conn, const char *name, const unsigned char *uuid) {
     virDomainPtr ret = NULL;
-    char uuidstr[VIR_UUID_STRING_BUFLEN];
 
     if (!VIR_IS_CONNECT(conn)) {
         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);
 
-    virUUIDFormat(uuid, uuidstr);
-
     if (VIR_ALLOC(ret) < 0) {
         virMutexUnlock(&conn->lock);
         virReportOOMError();
@@ -301,7 +298,6 @@ virUnrefDomain(virDomainPtr domain) {
 virNetworkPtr
 virGetNetwork(virConnectPtr conn, const char *name, const unsigned char *uuid) {
     virNetworkPtr ret = NULL;
-    char uuidstr[VIR_UUID_STRING_BUFLEN];
 
     if (!VIR_IS_CONNECT(conn)) {
         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);
 
-    virUUIDFormat(uuid, uuidstr);
-
     if (VIR_ALLOC(ret) < 0) {
         virMutexUnlock(&conn->lock);
         virReportOOMError();
@@ -562,7 +556,6 @@ virStoragePoolPtr
 virGetStoragePool(virConnectPtr conn, const char *name,
                   const unsigned char *uuid) {
     virStoragePoolPtr ret = NULL;
-    char uuidstr[VIR_UUID_STRING_BUFLEN];
 
     if (!VIR_IS_CONNECT(conn)) {
         virLibConnError(VIR_ERR_INVALID_CONN, "%s", _("no connection"));
@@ -573,8 +566,6 @@ virGetStoragePool(virConnectPtr conn, const char *name,
 
     virMutexLock(&conn->lock);
 
-    virUUIDFormat(uuid, uuidstr);
-
     if (VIR_ALLOC(ret) < 0) {
         virMutexUnlock(&conn->lock);
         virReportOOMError();
@@ -946,7 +937,6 @@ virGetSecret(virConnectPtr conn, const unsigned char *uuid,
              int usageType, const char *usageID)
 {
     virSecretPtr ret = NULL;
-    char uuidstr[VIR_UUID_STRING_BUFLEN];
 
     if (!VIR_IS_CONNECT(conn)) {
         virLibConnError(VIR_ERR_INVALID_CONN, "%s", _("no connection"));
@@ -957,8 +947,6 @@ virGetSecret(virConnectPtr conn, const unsigned char *uuid,
 
     virMutexLock(&conn->lock);
 
-    virUUIDFormat(uuid, uuidstr);
-
     if (VIR_ALLOC(ret) < 0) {
         virMutexUnlock(&conn->lock);
         virReportOOMError();
@@ -1128,7 +1116,6 @@ int virUnrefStream(virStreamPtr st) {
 virNWFilterPtr
 virGetNWFilter(virConnectPtr conn, const char *name, const unsigned char *uuid) {
     virNWFilterPtr ret = NULL;
-    char uuidstr[VIR_UUID_STRING_BUFLEN];
 
     if (!VIR_IS_CONNECT(conn)) {
         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);
 
-    virUUIDFormat(uuid, uuidstr);
-
     if (VIR_ALLOC(ret) < 0) {
         virMutexUnlock(&conn->lock);
         virReportOOMError();
-- 
1.7.10.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]