cleaned up string functions

This commit is contained in:
Olof hagsand 2017-04-04 17:11:21 +02:00
parent 75e1ea7c1c
commit 236b661e43
18 changed files with 245 additions and 427 deletions

View file

@ -174,7 +174,7 @@ main(int argc, char **argv)
int help = 0;
char *treename;
int logdst = CLICON_LOG_STDERR;
char *restarg; /* what remains after options */
char *restarg = NULL; /* what remains after options */
/* Defaults */
@ -366,7 +366,7 @@ main(int argc, char **argv)
clicon_option_dump(h, debug);
/* Join rest of argv to a single command */
restarg = clicon_strjoin(argc, argv, " ", __FUNCTION__);
restarg = clicon_strjoin(argc, argv, " ");
/* If several cligen object variables match same preference, select first */
cligen_match_cgvar_same(1);
@ -389,6 +389,8 @@ main(int argc, char **argv)
if (!once)
cli_interactive(h);
done:
if (restarg)
free(restarg);
unchunk_group(__FUNCTION__);
// Gets in your face if we log on stderr
clicon_log_init(__PROGRAM__, LOG_INFO, 0); /* Log on syslog no stderr */