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

[libvirt] [PATCH 1/6] nodeinfo: Use sa_assert() instead of Coverity error tag



---
 src/nodeinfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/nodeinfo.c b/src/nodeinfo.c
index a05159c..2cfd16c 100644
--- a/src/nodeinfo.c
+++ b/src/nodeinfo.c
@@ -1124,8 +1124,8 @@ nodeSetMemoryParameterValue(virTypedParameterPtr param)
     int ret = -1;
     int rc = -1;
 
-    /* coverity[returned_null] */
     char *field = strchr(param->field, '_');
+    sa_assert(field);
     field++;
     if (virAsprintf(&path, "%s/%s",
                     SYSFS_MEMORY_SHARED_PATH, field) < 0) {
@@ -1162,8 +1162,8 @@ nodeMemoryParametersIsAllSupported(virTypedParameterPtr params,
     for (i = 0; i < nparams; i++) {
         virTypedParameterPtr param = &params[i];
 
-        /* coverity[returned_null] */
         char *field = strchr(param->field, '_');
+        sa_assert(field);
         field++;
         if (virAsprintf(&path, "%s/%s",
                         SYSFS_MEMORY_SHARED_PATH, field) < 0) {
-- 
1.7.11.7


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