Cleanup, debug stmts, diff vars and obsolete compile options

This commit is contained in:
Olof hagsand 2022-06-23 12:36:17 +02:00
parent bdb516fec9
commit 33c77c8a09
4 changed files with 6 additions and 19 deletions

View file

@ -303,6 +303,10 @@ filter_xpath_again(clicon_handle h,
int retval = -1; int retval = -1;
int i; int i;
if (xret == NULL){
clicon_err(OE_PLUGIN, EINVAL, "xret is NULL");
goto done;
}
/* If vectors are specified then mark the nodes found and /* If vectors are specified then mark the nodes found and
* then filter out everything else, * then filter out everything else,
* otherwise return complete tree. * otherwise return complete tree.

View file

@ -164,19 +164,4 @@
*/ */
#define PROTO_RESTART_RECONNECT #define PROTO_RESTART_RECONNECT
/*! Text output keys as identifiers instead of ordinary leafs
* That is, given list "list" with key value "a", if set, the output of show config or save
* as text command is:
* list a {
* val 42;
* }
* If not set, the output is:
* list {
* keyname a;
* val 42;
* }
* The TEXT parser (ie load) accepts both formats.
*/
#define TEXT_LIST_KEYS

View file

@ -238,7 +238,7 @@ clicon_file_dirent(const char *dir,
clicon_err(OE_UNIX, errno, "realloc"); clicon_err(OE_UNIX, errno, "realloc");
goto quit; goto quit;
} /* realloc */ } /* realloc */
clicon_debug(1, "%s memcpy(%p %p %u", __FUNCTION__, &new[nent], dent, direntStructSize); clicon_debug(2, "%s memcpy(%p %p %u", __FUNCTION__, &new[nent], dent, direntStructSize);
/* man (3) readdir: /* man (3) readdir:
* By implication, the use sizeof(struct dirent) to capture the size of the record including * By implication, the use sizeof(struct dirent) to capture the size of the record including
* the size of d_name is also incorrect. */ * the size of d_name is also incorrect. */

View file

@ -351,9 +351,7 @@ function err(){
fi fi
echo -e "\e[0m" echo -e "\e[0m"
echo "Diff between Expected and Received:" echo "Diff between Expected and Received:"
echo "$ret"| od -t c > $dir/clixon-ret diff <(echo "$ret"| od -t c) <(echo "$expect"| od -t c)
echo "$expect"| od -t c > $dir/clixon-expect
diff $dir/clixon-expect $dir/clixon-ret
exit -1 #$testnr exit -1 #$testnr
} }