C-style update: Unified comment, retvals in order, remove trailing spaces
Changed function name for `clicon_debug` functions
This commit is contained in:
parent
6e314dd96f
commit
62348fc9c7
204 changed files with 6047 additions and 4904 deletions
|
|
@ -92,7 +92,7 @@ netconf_input_read2(int s,
|
|||
{
|
||||
int retval = -1;
|
||||
ssize_t len;
|
||||
|
||||
|
||||
memset(buf, 0, buflen);
|
||||
if ((len = read(s, buf, buflen)) < 0){
|
||||
if (errno == ECONNRESET)
|
||||
|
|
@ -102,14 +102,14 @@ netconf_input_read2(int s,
|
|||
goto done;
|
||||
}
|
||||
} /* read */
|
||||
clicon_debug(CLIXON_DBG_DETAIL, "%s len:%ld", __FUNCTION__, len);
|
||||
clixon_debug(CLIXON_DBG_DETAIL, "%s len:%ld", __FUNCTION__, len);
|
||||
if (len == 0){ /* EOF */
|
||||
clicon_debug(CLIXON_DBG_DETAIL, "%s len==0, closing", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_DETAIL, "%s len==0, closing", __FUNCTION__);
|
||||
*eof = 1;
|
||||
}
|
||||
retval = len;
|
||||
done:
|
||||
clicon_debug(CLIXON_DBG_DETAIL, "%s retval:%d", __FUNCTION__, retval);
|
||||
clixon_debug(CLIXON_DBG_DETAIL, "%s retval:%d", __FUNCTION__, retval);
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
|
@ -146,7 +146,7 @@ netconf_input_msg2(unsigned char **bufp,
|
|||
size_t len;
|
||||
char ch;
|
||||
|
||||
clicon_debug(CLIXON_DBG_DETAIL, "%s", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_DETAIL, "%s", __FUNCTION__);
|
||||
len = *lenp;
|
||||
for (i=0; i<len; i++){
|
||||
if ((ch = (*bufp)[i]) == 0)
|
||||
|
|
@ -189,7 +189,7 @@ netconf_input_msg2(unsigned char **bufp,
|
|||
*eom = found;
|
||||
retval = 0;
|
||||
done:
|
||||
clicon_debug(CLIXON_DBG_DETAIL, "%s retval:%d", __FUNCTION__, retval);
|
||||
clixon_debug(CLIXON_DBG_DETAIL, "%s retval:%d", __FUNCTION__, retval);
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
|
@ -217,14 +217,14 @@ netconf_input_frame2(cbuf *cb,
|
|||
cxobj *xtop = NULL; /* Request (in) */
|
||||
int ret;
|
||||
|
||||
clicon_debug(CLIXON_DBG_DETAIL, "%s", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_DETAIL, "%s", __FUNCTION__);
|
||||
if (xrecv == NULL){
|
||||
clicon_err(OE_PLUGIN, EINVAL, "xrecv is NULL");
|
||||
goto done;
|
||||
}
|
||||
str = cbuf_get(cb);
|
||||
/* Special case: empty XML */
|
||||
if (strlen(str) == 0){
|
||||
if (strlen(str) == 0){
|
||||
if (netconf_operation_failed_xml(xerr, "rpc", "Empty XML")< 0)
|
||||
goto done;
|
||||
goto failed;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue