warnings and asserts

This commit is contained in:
Olof Hagsand 2017-06-05 13:26:47 +02:00
parent 0d7351093b
commit 07fe90b4c4
4 changed files with 18 additions and 6 deletions

View file

@ -1473,8 +1473,10 @@ api_path2xml_vec(char **vec,
yang_stmt *y = NULL;
if ((name = vec[0]) == NULL){
*xpathp = x0;
*ypathp = y0;
if (xpathp)
*xpathp = x0;
if (ypathp)
*ypathp = y0;
return 0;
} /* E.g "x=1,2" -> name:x restval=1,2 */
/* restval is RFC 3896 encoded */

View file

@ -168,12 +168,12 @@ xml_parse_bslash1(struct xml_parse_yacc_arg *ya,
cxobj *xc;
if (strcmp(xml_name(x), name)){
clicon_err(OE_XML, 0, "Sanity check failed: %s vs %s",
clicon_err(OE_XML, 0, "XML parse sanity check failed: %s vs %s",
xml_name(x), name);
goto done;
}
if (xml_namespace(x)!=NULL){
clicon_err(OE_XML, 0, "Sanity check failed: %s:%s vs %s\n",
clicon_err(OE_XML, 0, "XML parse sanity check failed: %s:%s vs %s\n",
xml_namespace(x), xml_name(x), name);
goto done;
}