Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Cleanup and fixes based on Coverity pass
[palacios.git] / palacios / src / palacios / vmm_xml.c
index f3cf7e3..a9c6659 100644 (file)
@@ -480,8 +480,12 @@ static struct v3_xml * parse_str(char * buf, size_t len) {
     char ** attr; 
     int attr_idx;
 
-    if (!buf) {
-       return NULL;
+    if (buf==NULL) {
+      return NULL;
+    }
+
+    if (root==NULL) {
+      return NULL;
     }
 
     root->str_ptr = buf;
@@ -692,7 +696,8 @@ static struct v3_xml * parse_str(char * buf, size_t len) {
            return NULL;
         }
 
-        if (! buf || ! *buf) {
+       // at this point, buf cannot be NULL
+        if (!*buf) {
            break;
        }