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:
Daniel P. Berrange 2012-07-31 17:55:02 +01:00
parent 0c9fd4cfe9
commit 03be7ab586

View File

@ -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();