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

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



From: "Daniel P. Berrange" <berrange redhat com>

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


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