[libvirt] [PATCH 4/8] cgroup: silence coverity warning

Eric Blake eblake at redhat.com
Fri Jul 1 23:36:02 UTC 2011


Coverity noted that most clients reacted to failure to hash; but in
a best-effort kill loop, we can ignore failure.

* src/util/cgroup.c (virCgroupKillInternal): Ignore hash failure.
---
 src/util/cgroup.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/util/cgroup.c b/src/util/cgroup.c
index 2e5ef46..740cedf 100644
--- a/src/util/cgroup.c
+++ b/src/util/cgroup.c
@@ -1395,7 +1395,7 @@ static int virCgroupKillInternal(virCgroupPtr group, int signum, virHashTablePtr
                     done = false;
                 }

-                virHashAddEntry(pids, (void*)pid, (void*)1);
+                ignore_value(virHashAddEntry(pids, (void*)pid, (void*)1));
             }
             VIR_FORCE_FCLOSE(fp);
         }
-- 
1.7.4.4




More information about the libvir-list mailing list