Skip to content

Commit

Permalink
domain: clang-format for coherent indentation and coding style
Browse files Browse the repository at this point in the history
  • Loading branch information
linuxmaniac committed May 18, 2023
1 parent d97cebf commit 8eb3ae2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
3 changes: 2 additions & 1 deletion src/modules/domain/api.h
Expand Up @@ -27,7 +27,8 @@

typedef int (*is_domain_local_t)(str *_domain);

typedef struct domain_api {
typedef struct domain_api
{
is_domain_local_t is_domain_local;
} domain_api_t;

Expand Down
11 changes: 6 additions & 5 deletions src/modules/domain/domain.c
Expand Up @@ -173,7 +173,7 @@ int ki_is_domain_local(struct sip_msg *_msg, str *sdomain)
struct attr_list *attrs;
str did;

if(sdomain==NULL || sdomain->s==NULL) {
if(sdomain == NULL || sdomain->s == NULL) {
LM_ERR("invalid parameters\n");
return -1;
}
Expand Down Expand Up @@ -205,9 +205,10 @@ int ki_lookup_domain_prefix(struct sip_msg *_msg, str *_sdomain, str *_sprefix)
str did;
unsigned short flags;

if(_sdomain==NULL || _sdomain->s==NULL) {
if(_sdomain == NULL || _sdomain->s == NULL) {
LM_ERR("invalid domain parameter\n");
return -1; }
return -1;
}

if(hash_table_lookup(_sdomain, &did, &attrs) != 1) {
return -1;
Expand Down Expand Up @@ -296,7 +297,7 @@ int w_lookup_domain(struct sip_msg *_msg, char *_sp, char *_prefix)
}
}

return ki_lookup_domain_prefix(_msg, &sdomain, (_prefix)?&sprefix:NULL);
return ki_lookup_domain_prefix(_msg, &sdomain, (_prefix) ? &sprefix : NULL);
}

/*
Expand Down Expand Up @@ -394,7 +395,7 @@ int reload_tables(void)

if((VAL_NULL(ROW_VALUES(row) + 2) == 1)
|| ((VAL_TYPE(ROW_VALUES(row) + 2) != DB1_INT)
&& (VAL_TYPE(ROW_VALUES(row) + 2) != DB1_BIGINT))) {
&& (VAL_TYPE(ROW_VALUES(row) + 2) != DB1_BIGINT))) {
LM_ERR("type at row <%u> is null or not int\n", i);
goto err;
}
Expand Down
8 changes: 3 additions & 5 deletions src/modules/domain/domain_mod.c
Expand Up @@ -73,8 +73,8 @@ str domain_table = str_init(DOMAIN_TABLE); /* Name of domain table */
str domain_attrs_table = str_init(DOMAIN_ATTRS_TABLE);
str did_col = str_init(DID_COL); /* Name of domain id column */
str domain_col = str_init(DOMAIN_COL); /* Name of domain column */
str name_col = str_init(NAME_COL); /* Name of attribute name column */
str type_col = str_init(TYPE_COL); /* Name of attribute type column */
str name_col = str_init(NAME_COL); /* Name of attribute name column */
str type_col = str_init(TYPE_COL); /* Name of attribute type column */
str value_col = str_init(VALUE_COL); /* Name of attribute value column */
int domain_reg_myself = 0;

Expand Down Expand Up @@ -340,9 +340,7 @@ static void domain_rpc_dump(rpc_t *rpc, void *ctx)

rpc_export_t domain_rpc_list[] = {
{"domain.reload", domain_rpc_reload, domain_rpc_reload_doc, 0},
{"domain.dump", domain_rpc_dump, domain_rpc_dump_doc, 0},
{0, 0, 0, 0}
};
{"domain.dump", domain_rpc_dump, domain_rpc_dump_doc, 0}, {0, 0, 0, 0}};

static int domain_init_rpc(void)
{
Expand Down

0 comments on commit 8eb3ae2

Please sign in to comment.