Skip to content

Commit

Permalink
cfgt: clang-format for coherent indentation and coding style
Browse files Browse the repository at this point in the history
  • Loading branch information
linuxmaniac committed Nov 11, 2023
1 parent 4400641 commit 8231482
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/modules/cfgt/cfgt_int.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ void _cfgt_remove_report(const str *scen)
}
}
snprintf(filepath.s, dest.len + 1, "%s/%s", dest.s,
next_file->d_name);
next_file->d_name);
if(remove(filepath.s) < 0) {
LM_ERR("failed removing file: %s\n", strerror(errno));
} else {
Expand Down Expand Up @@ -778,7 +778,7 @@ int cfgt_pre(struct sip_msg *msg, unsigned int flags, void *bar)
}
res = _cfgt_get_uuid_id(_cfgt_node);
LM_INFO("*** node uuid:[%.*s] id:[%d] created ***\n",
STR_FMT(&_cfgt_node->uuid), _cfgt_node->msgid);
STR_FMT(&_cfgt_node->uuid), _cfgt_node->msgid);
return res;
} else {
LM_DBG("_cfgt_node->uuid:[%.*s]\n", _cfgt_node->uuid.len,
Expand Down
22 changes: 12 additions & 10 deletions src/modules/cfgt/cfgt_json.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,12 +300,12 @@ int cfgt_get_json(struct sip_msg *msg, unsigned int mask, srjson_doc_t *jdoc,
|| el->spec.type == PVT_XAVP
|| el->spec.type == PVT_OTHER)
|| !((el->spec.type == PVT_AVP && mask & CFGT_DP_AVP)
|| (el->spec.type == PVT_XAVP
&& mask & CFGT_DP_XAVP)
|| (el->spec.type == PVT_SCRIPTVAR
&& mask & CFGT_DP_SCRIPTVAR)
|| (el->spec.type == PVT_OTHER
&& mask & CFGT_DP_OTHER))
|| (el->spec.type == PVT_XAVP
&& mask & CFGT_DP_XAVP)
|| (el->spec.type == PVT_SCRIPTVAR
&& mask & CFGT_DP_SCRIPTVAR)
|| (el->spec.type == PVT_OTHER
&& mask & CFGT_DP_OTHER))
|| (el->spec.trans != NULL)) {
el = el->next;
continue;
Expand All @@ -316,7 +316,7 @@ int cfgt_get_json(struct sip_msg *msg, unsigned int mask, srjson_doc_t *jdoc,
if(el->spec.type == PVT_AVP) {
if(el->spec.pvp.pvi.type == PV_IDX_ALL
|| (el->spec.pvp.pvi.type == PV_IDX_INT
&& el->spec.pvp.pvi.u.ival != 0)) {
&& el->spec.pvp.pvi.u.ival != 0)) {
el = el->next;
continue;
} else {
Expand All @@ -328,8 +328,9 @@ int cfgt_get_json(struct sip_msg *msg, unsigned int mask, srjson_doc_t *jdoc,
el = el->next;
continue;
}
if(jobj == NULL || (srjson_GetArraySize(jdoc, jobj) == 0
&& !(mask & CFGT_DP_NULL))) {
if(jobj == NULL
|| (srjson_GetArraySize(jdoc, jobj) == 0
&& !(mask & CFGT_DP_NULL))) {
el = el->next;
continue;
}
Expand Down Expand Up @@ -362,7 +363,8 @@ int cfgt_get_json(struct sip_msg *msg, unsigned int mask, srjson_doc_t *jdoc,
continue;
}
if(strchr(el->pvname.s + 1, 36) != NULL) {
LM_DBG("skip dynamic format [%.*s]\n", el->pvname.len, el->pvname.s);
LM_DBG("skip dynamic format [%.*s]\n", el->pvname.len,
el->pvname.s);
el = el->next;
continue;
}
Expand Down
3 changes: 2 additions & 1 deletion src/modules/cfgt/cfgt_mod.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,5 @@ static int child_init(int _rank)
* Module destroy function
*/
static void destroy(void)
{}
{
}

0 comments on commit 8231482

Please sign in to comment.