diff --git a/apps/backend/backend_main.c b/apps/backend/backend_main.c index 43be8f8d..0bc7524f 100644 --- a/apps/backend/backend_main.c +++ b/apps/backend/backend_main.c @@ -415,7 +415,7 @@ usage(clicon_handle h, "\t-1\t\tRun once and then quit (dont wait for events)\n" "\t-s \tSpecify backend startup mode: none|startup|running|init)\n" "\t-c \tLoad extra xml configuration, but don't commit.\n" - "\t-q \tQuit startup directly after upgrading and print result on stdout\n" + "\t-q \t\tQuit startup directly after upgrading and print result on stdout\n" "\t-U \tRun backend daemon as this user AND drop privileges permanently\n" "\t-g \tClient membership required to this group (default: %s)\n" diff --git a/lib/src/clixon_string.c b/lib/src/clixon_string.c index 9d536be6..c2408e0d 100644 --- a/lib/src/clixon_string.c +++ b/lib/src/clixon_string.c @@ -107,7 +107,7 @@ clicon_strsep(char *string, } memset(vec, 0, siz); ptr = (char*)vec + (nvec+1)* sizeof(char*); /* this is where ptr starts */ - strncpy(ptr, string, strlen(string)+1); + strcpy(ptr, string); i = 0; while ((p = strsep(&ptr, delim)) != NULL) vec[i++] = p; diff --git a/lib/src/clixon_xpath_parse.y b/lib/src/clixon_xpath_parse.y index 372b8996..1e871e0e 100644 --- a/lib/src/clixon_xpath_parse.y +++ b/lib/src/clixon_xpath_parse.y @@ -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: