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

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

 



---
 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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]