Drop __FUNCTION__ from clixon_debug() calls

This commit is contained in:
Philip Prindeville 2024-01-10 21:49:59 -07:00 committed by Olof Hagsand
parent d5a8d6b6e1
commit cf2e27b43d
74 changed files with 619 additions and 578 deletions

View file

@ -120,7 +120,7 @@ clixon_client_init(const char *config_file)
{
clixon_handle h;
clixon_debug(CLIXON_DBG_DEFAULT, "%s", __FUNCTION__);
clixon_debug(CLIXON_DBG_DEFAULT, "");
/* Initiate CLICON handle. CLIgen is also initialized */
if ((h = clixon_handle_init()) == NULL)
return NULL;
@ -141,7 +141,7 @@ clixon_client_init(const char *config_file)
int
clixon_client_terminate(clixon_handle h)
{
clixon_debug(CLIXON_DBG_DEFAULT, "%s", __FUNCTION__);
clixon_debug(CLIXON_DBG_DEFAULT, "");
clixon_handle_exit(h);
return 0;
}
@ -170,7 +170,7 @@ clixon_client_lock(clixon_handle h,
cbuf *msgret = NULL;
int eof = 0;
clixon_debug(CLIXON_DBG_DEFAULT, "%s", __FUNCTION__);
clixon_debug(CLIXON_DBG_DEFAULT, "");
if (db == NULL){
clixon_err(OE_XML, EINVAL, "Expected db");
goto done;
@ -204,7 +204,7 @@ clixon_client_lock(clixon_handle h,
}
retval = 0;
done:
clixon_debug(CLIXON_DBG_DEFAULT, "%s retval:%d", __FUNCTION__, retval);
clixon_debug(CLIXON_DBG_DEFAULT, "retval:%d", retval);
if (xret)
xml_free(xret);
if (msg)
@ -230,7 +230,7 @@ clixon_client_hello(int sock,
int retval = -1;
cbuf *msg = NULL;
clixon_debug(CLIXON_DBG_DEFAULT, "%s", __FUNCTION__);
clixon_debug(CLIXON_DBG_DEFAULT, "");
if ((msg = cbuf_new()) == NULL){
clixon_err(OE_PLUGIN, errno, "cbuf_new");
goto done;
@ -246,7 +246,7 @@ clixon_client_hello(int sock,
goto done;
retval = 0;
done:
clixon_debug(CLIXON_DBG_DEFAULT, "%s retval:%d", __FUNCTION__, retval);
clixon_debug(CLIXON_DBG_DEFAULT, "retval:%d", retval);
if (msg)
cbuf_free(msg);
return retval;
@ -316,7 +316,7 @@ clixon_client_connect_ssh(clixon_handle h,
char *ssh_bin = SSH_BIN;
struct stat st = {0,};
clixon_debug(CLIXON_DBG_DEFAULT, "%s", __FUNCTION__);
clixon_debug(CLIXON_DBG_DEFAULT, "");
nr = 5;
if ((argv = calloc(nr, sizeof(char *))) == NULL){
clixon_err(OE_UNIX, errno, "calloc");
@ -334,7 +334,7 @@ clixon_client_connect_ssh(clixon_handle h,
argv[i++] = NULL;
assert(i==nr);
for (i=0;i<nr;i++)
clixon_debug(CLIXON_DBG_DEFAULT, "%s: argv[%d]:%s", __FUNCTION__, i, argv[i]);
clixon_debug(CLIXON_DBG_DEFAULT, "argv[%d]:%s", i, argv[i]);
if (clixon_proc_socket(h, argv, SOCK_STREAM, &cch->cch_pid, &cch->cch_socket) < 0){
goto done;
}
@ -360,7 +360,7 @@ clixon_client_connect(clixon_handle h,
struct clixon_client_handle *cch = NULL;
size_t sz = sizeof(struct clixon_client_handle);
clixon_debug(CLIXON_DBG_DEFAULT, "%s", __FUNCTION__);
clixon_debug(CLIXON_DBG_DEFAULT, "");
if ((cch = malloc(sz)) == NULL){
clixon_err(OE_NETCONF, errno, "malloc");
goto done;
@ -389,7 +389,7 @@ clixon_client_connect(clixon_handle h,
break;
} /* switch */
done:
clixon_debug(CLIXON_DBG_DEFAULT, "%s retval:%p", __FUNCTION__, cch);
clixon_debug(CLIXON_DBG_DEFAULT, "retval:%p", cch);
return cch;
err:
if (cch)
@ -412,7 +412,7 @@ clixon_client_disconnect(clixon_client_handle ch)
int retval = -1;
struct clixon_client_handle *cch = chandle(ch);
clixon_debug(CLIXON_DBG_DEFAULT, "%s", __FUNCTION__);
clixon_debug(CLIXON_DBG_DEFAULT, "");
if (cch == NULL){
clixon_err(OE_XML, EINVAL, "Expected cch handle");
goto done;
@ -501,7 +501,7 @@ clixon_client_get_xdata(clixon_handle h,
cvec *nsc = NULL;
int eof = 0;
clixon_debug(CLIXON_DBG_DEFAULT, "%s", __FUNCTION__);
clixon_debug(CLIXON_DBG_DEFAULT, "");
if ((msg = cbuf_new()) == NULL){
clixon_err(OE_PLUGIN, errno, "cbuf_new");
goto done;
@ -556,7 +556,7 @@ clixon_client_get_xdata(clixon_handle h,
*xdata = xd;
retval = 0;
done:
clixon_debug(CLIXON_DBG_DEFAULT, "%s retval:%d", __FUNCTION__, retval);
clixon_debug(CLIXON_DBG_DEFAULT, "retval:%d", retval);
if (xret)
xml_free(xret);
if (msg)
@ -589,7 +589,7 @@ clixon_client_get_body_val(clixon_handle h,
cxobj *xdata = NULL;
cxobj *xobj = NULL;
clixon_debug(CLIXON_DBG_DEFAULT, "%s", __FUNCTION__);
clixon_debug(CLIXON_DBG_DEFAULT, "");
if (val == NULL){
clixon_err(OE_XML, EINVAL, "Expected val");
goto done;
@ -614,7 +614,7 @@ clixon_client_get_body_val(clixon_handle h,
*val = xml_body(xobj);
retval = 0;
done:
clixon_debug(CLIXON_DBG_DEFAULT, "%s retval:%d", __FUNCTION__, retval);
clixon_debug(CLIXON_DBG_DEFAULT, "retval:%d", retval);
return retval;
}
@ -640,7 +640,7 @@ clixon_client_get_bool(clixon_client_handle ch,
int ret;
uint8_t val0=0;
clixon_debug(CLIXON_DBG_DEFAULT, "%s", __FUNCTION__);
clixon_debug(CLIXON_DBG_DEFAULT, "");
if (clixon_client_get_body_val(cch->cch_h, cch->cch_socket, cch->cch_descr,
namespace, xpath, &val) < 0)
goto done;
@ -681,7 +681,7 @@ clixon_client_get_str(clixon_client_handle ch,
struct clixon_client_handle *cch = chandle(ch);
char *val = NULL;
clixon_debug(CLIXON_DBG_DEFAULT, "%s", __FUNCTION__);
clixon_debug(CLIXON_DBG_DEFAULT, "");
if (clixon_client_get_body_val(cch->cch_h, cch->cch_socket, cch->cch_descr,
namespace, xpath, &val) < 0)
goto done;
@ -713,7 +713,7 @@ clixon_client_get_uint8(clixon_client_handle ch,
char *reason = NULL;
int ret;
clixon_debug(CLIXON_DBG_DEFAULT, "%s", __FUNCTION__);
clixon_debug(CLIXON_DBG_DEFAULT, "");
if (clixon_client_get_body_val(cch->cch_h, cch->cch_socket, cch->cch_descr,
namespace, xpath, &val) < 0)
goto done;
@ -753,7 +753,7 @@ clixon_client_get_uint16(clixon_client_handle ch,
char *reason = NULL;
int ret;
clixon_debug(CLIXON_DBG_DEFAULT, "%s", __FUNCTION__);
clixon_debug(CLIXON_DBG_DEFAULT, "");
if (clixon_client_get_body_val(cch->cch_h, cch->cch_socket, cch->cch_descr,
namespace, xpath, &val) < 0)
goto done;
@ -793,7 +793,7 @@ clixon_client_get_uint32(clixon_client_handle ch,
char *reason = NULL;
int ret;
clixon_debug(CLIXON_DBG_DEFAULT, "%s", __FUNCTION__);
clixon_debug(CLIXON_DBG_DEFAULT, "");
if (clixon_client_get_body_val(cch->cch_h, cch->cch_socket, cch->cch_descr,
namespace, xpath, &val) < 0)
goto done;
@ -811,7 +811,7 @@ clixon_client_get_uint32(clixon_client_handle ch,
}
retval = 0;
done:
clixon_debug(CLIXON_DBG_DEFAULT, "%s retval:%d", __FUNCTION__, retval);
clixon_debug(CLIXON_DBG_DEFAULT, "retval:%d", retval);
if (reason)
free(reason);
return retval;
@ -838,7 +838,7 @@ clixon_client_get_uint64(clixon_client_handle ch,
char *reason = NULL;
int ret;
clixon_debug(CLIXON_DBG_DEFAULT, "%s", __FUNCTION__);
clixon_debug(CLIXON_DBG_DEFAULT, "");
if (clixon_client_get_body_val(cch->cch_h, cch->cch_socket, cch->cch_descr,
namespace, xpath, &val) < 0)
goto done;