minor: strncpy -> strcpy and formatting

This commit is contained in:
Olof hagsand 2020-10-10 15:32:19 +02:00
parent f8ac8cc14b
commit f9cc26582a
3 changed files with 8 additions and 4 deletions

View file

@ -218,8 +218,9 @@ xp_primary_function(clixon_xpath_yacc *xpy,
xpath_tree *xtret = NULL;
enum clixon_xpath_function fn;
cbuf *cb = NULL;
int ret;
if ((fn = xp_fnname_str2int(name)) < 0){
if ((ret = xp_fnname_str2int(name)) < 0){
if ((cb = cbuf_new()) == NULL){
clicon_err(OE_XML, errno, "cbuf_new");
goto done;
@ -228,6 +229,7 @@ xp_primary_function(clixon_xpath_yacc *xpy,
clixon_xpath_parseerror(xpy, cbuf_get(cb));
goto done;
}
fn = ret;
switch (fn){
case XPATHFN_RE_MATCH: /* Group of NOT IMPLEMENTED xpath functions */
case XPATHFN_ENUM_VALUE:
@ -309,8 +311,9 @@ xp_nodetest_function(clixon_xpath_yacc *xpy,
xpath_tree *xtret = NULL;
enum clixon_xpath_function fn;
cbuf *cb = NULL;
int ret;
if ((fn = xp_fnname_str2int(name)) < 0){
if ((ret = xp_fnname_str2int(name)) < 0){
if ((cb = cbuf_new()) == NULL){
clicon_err(OE_XML, errno, "cbuf_new");
goto done;
@ -319,6 +322,7 @@ xp_nodetest_function(clixon_xpath_yacc *xpy,
clixon_xpath_parseerror(xpy, cbuf_get(cb));
goto done;
}
fn = ret;
switch (fn){
case XPATHFN_COMMENT: /* Group of not implemented node functions */
case XPATHFN_PROCESSING_INSTRUCTIONS: