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

[libvirt] [PATCH] virCondDestroy: Loose attribute RETURN_CHECK



We are wrapping it in ignore_value() anyway.
---
 src/nwfilter/nwfilter_dhcpsnoop.c | 2 +-
 src/qemu/qemu_agent.c             | 2 +-
 src/qemu/qemu_domain.c            | 6 +++---
 src/qemu/qemu_monitor.c           | 3 +--
 src/rpc/virnetclient.c            | 6 +++---
 src/util/virthread.h              | 2 +-
 src/util/virthreadpool.c          | 6 +++---
 tools/console.c                   | 2 +-
 8 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/src/nwfilter/nwfilter_dhcpsnoop.c b/src/nwfilter/nwfilter_dhcpsnoop.c
index 90b5615..5124069 100644
--- a/src/nwfilter/nwfilter_dhcpsnoop.c
+++ b/src/nwfilter/nwfilter_dhcpsnoop.c
@@ -636,7 +636,7 @@ virNWFilterSnoopReqFree(virNWFilterSnoopReqPtr req)
     virNWFilterHashTableFree(req->vars);
 
     virMutexDestroy(&req->lock);
-    ignore_value(virCondDestroy(&req->threadStatusCond));
+    virCondDestroy(&req->threadStatusCond);
 
     VIR_FREE(req);
 }
diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c
index 05641da..ebe777b 100644
--- a/src/qemu/qemu_agent.c
+++ b/src/qemu/qemu_agent.c
@@ -158,7 +158,7 @@ static void qemuAgentDispose(void *obj)
     VIR_DEBUG("mon=%p", mon);
     if (mon->cb && mon->cb->destroy)
         (mon->cb->destroy)(mon, mon->vm);
-    ignore_value(virCondDestroy(&mon->notify));
+    virCondDestroy(&mon->notify);
     VIR_FREE(mon->buffer);
 }
 
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 5bf0ab0..46c22e1 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -133,7 +133,7 @@ qemuDomainObjInitJob(qemuDomainObjPrivatePtr priv)
         return -1;
 
     if (virCondInit(&priv->job.asyncCond) < 0) {
-        ignore_value(virCondDestroy(&priv->job.cond));
+        virCondDestroy(&priv->job.cond);
         return -1;
     }
 
@@ -194,8 +194,8 @@ qemuDomainObjTransferJob(virDomainObjPtr obj)
 static void
 qemuDomainObjFreeJob(qemuDomainObjPrivatePtr priv)
 {
-    ignore_value(virCondDestroy(&priv->job.cond));
-    ignore_value(virCondDestroy(&priv->job.asyncCond));
+    virCondDestroy(&priv->job.cond);
+    virCondDestroy(&priv->job.asyncCond);
 }
 
 static bool
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index 3f1aed8..7af571d 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -236,8 +236,7 @@ static void qemuMonitorDispose(void *obj)
     VIR_DEBUG("mon=%p", mon);
     if (mon->cb && mon->cb->destroy)
         (mon->cb->destroy)(mon, mon->vm);
-    if (virCondDestroy(&mon->notify) < 0)
-    {}
+    virCondDestroy(&mon->notify);
     VIR_FREE(mon->buffer);
 }
 
diff --git a/src/rpc/virnetclient.c b/src/rpc/virnetclient.c
index 44638e2..4efa578 100644
--- a/src/rpc/virnetclient.c
+++ b/src/rpc/virnetclient.c
@@ -1382,7 +1382,7 @@ static bool virNetClientIOEventLoopRemoveDone(virNetClientCallPtr call,
         VIR_DEBUG("Removing completed call %p", call);
         if (call->expectReply)
             VIR_WARN("Got a call expecting a reply but without a waiting thread");
-        ignore_value(virCondDestroy(&call->cond));
+        virCondDestroy(&call->cond);
         VIR_FREE(call->msg);
         VIR_FREE(call);
     }
@@ -1409,7 +1409,7 @@ virNetClientIOEventLoopRemoveAll(virNetClientCallPtr call,
         return false;
 
     VIR_DEBUG("Removing call %p", call);
-    ignore_value(virCondDestroy(&call->cond));
+    virCondDestroy(&call->cond);
     VIR_FREE(call->msg);
     VIR_FREE(call);
     return true;
@@ -1972,7 +1972,7 @@ static int virNetClientSendInternal(virNetClientPtr client,
     if (ret == 1)
         return 1;
 
-    ignore_value(virCondDestroy(&call->cond));
+    virCondDestroy(&call->cond);
     VIR_FREE(call);
     return ret;
 }
diff --git a/src/util/virthread.h b/src/util/virthread.h
index c209440..c59a2cf 100644
--- a/src/util/virthread.h
+++ b/src/util/virthread.h
@@ -87,7 +87,7 @@ void virMutexUnlock(virMutexPtr m);
 
 
 int virCondInit(virCondPtr c) ATTRIBUTE_RETURN_CHECK;
-int virCondDestroy(virCondPtr c) ATTRIBUTE_RETURN_CHECK;
+int virCondDestroy(virCondPtr c);
 
 /* virCondWait, virCondWaitUntil:
  * These functions can return without the associated predicate
diff --git a/src/util/virthreadpool.c b/src/util/virthreadpool.c
index 7b8ba70..e657145 100644
--- a/src/util/virthreadpool.c
+++ b/src/util/virthreadpool.c
@@ -271,11 +271,11 @@ void virThreadPoolFree(virThreadPoolPtr pool)
     VIR_FREE(pool->workers);
     virMutexUnlock(&pool->mutex);
     virMutexDestroy(&pool->mutex);
-    ignore_value(virCondDestroy(&pool->quit_cond));
-    ignore_value(virCondDestroy(&pool->cond));
+    virCondDestroy(&pool->quit_cond);
+    virCondDestroy(&pool->cond);
     if (priority) {
         VIR_FREE(pool->prioWorkers);
-        ignore_value(virCondDestroy(&pool->prioCond));
+        virCondDestroy(&pool->prioCond);
     }
     VIR_FREE(pool);
 }
diff --git a/tools/console.c b/tools/console.c
index 29873ea..e423134 100644
--- a/tools/console.c
+++ b/tools/console.c
@@ -407,7 +407,7 @@ int vshRunConsole(virDomainPtr dom,
         if (con->st)
             virStreamFree(con->st);
         virMutexDestroy(&con->lock);
-        ignore_value(virCondDestroy(&con->cond));
+        virCondDestroy(&con->cond);
         VIR_FREE(con);
     }
 
-- 
1.8.0.2


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