---
src/util/virlockspace.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/util/virlockspace.c b/src/util/virlockspace.c
index 04aeebe..163404f 100644
--- a/src/util/virlockspace.c
+++ b/src/util/virlockspace.c
@@ -558,13 +558,12 @@ int virLockSpaceCreateResource(virLockSpacePtr lockspace,
{
int ret = -1;
char *respath = NULL;
- virLockSpaceResourcePtr res;
VIR_DEBUG("lockspace=%p resname=%s", lockspace, resname);
virMutexLock(&lockspace->lock);
- if ((res = virHashLookup(lockspace->resources, resname))) {
+ if (virHashLookup(lockspace->resources, resname) != NULL) {
virReportError(VIR_ERR_RESOURCE_BUSY,
_("Lockspace resource '%s' is locked"),
resname);
@@ -591,13 +590,12 @@ int virLockSpaceDeleteResource(virLockSpacePtr lockspace,
{
int ret = -1;
char *respath = NULL;
- virLockSpaceResourcePtr res;
VIR_DEBUG("lockspace=%p resname=%s", lockspace, resname);
virMutexLock(&lockspace->lock);
- if ((res = virHashLookup(lockspace->resources, resname))) {
+ if (virHashLookup(lockspace->resources, resname) != NULL) {
virReportError(VIR_ERR_RESOURCE_BUSY,
_("Lockspace resource '%s' is locked"),
resname);
--
1.7.11.7