use cbuf for xml value code

This commit is contained in:
Olof hagsand 2019-11-18 21:16:12 +01:00
parent f2cad01fc6
commit 9575d10887
5 changed files with 39 additions and 58 deletions

View file

@ -104,7 +104,7 @@ xml_parse_content(struct xml_parse_yacc_arg *ya,
goto done;
xml_type_set(xn, CX_BODY);
}
if (xml_value_append(xn, str)==NULL)
if (xml_value_append(xn, str) < 0)
goto done;
ya->ya_xelement = xn;
retval = 0;
@ -140,7 +140,7 @@ xml_parse_whitespace(struct xml_parse_yacc_arg *ya,
goto done;
xml_type_set(xn, CX_BODY);
}
if (xml_value_append(xn, str)==NULL)
if (xml_value_append(xn, str) < 0)
goto done;
ya->ya_xelement = xn;
ok:
@ -148,7 +148,6 @@ xml_parse_whitespace(struct xml_parse_yacc_arg *ya,
done:
return retval;
}
static int
xml_parse_version(struct xml_parse_yacc_arg *ya,