Skip to content

Commit

Permalink
cachedb_sql: fix warning: this if clause does not guard... [-Wmisle…
Browse files Browse the repository at this point in the history
…ading-indentation]

msilo: fix warning: this `else` clause does not guard... [-Wmisleading-indentation]
  • Loading branch information
ovidiusas authored and sobomax committed Feb 17, 2023
1 parent 0d438d0 commit a6e60a9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 19 deletions.
2 changes: 1 addition & 1 deletion modules/cachedb_sql/cachedb_sql.c
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ static int dbcache_fetch_counter(cachedb_con *con,str *attr,int *ret_val)
LM_ERR("unknown type of DB user column\n");
if (db_res != NULL && CACHEDBSQL_FUNC(con).free_result(CACHEDBSQL_CON(con), db_res) < 0)
LM_ERR("failed to freeing result of query\n");
return -1;
return -1;
}

return 1;
Expand Down
35 changes: 17 additions & 18 deletions modules/msilo/msilo.c
Original file line number Diff line number Diff line change
Expand Up @@ -946,24 +946,23 @@ static int m_dump(struct sip_msg* msg, str* owner, int* maxmsg)
else
LM_DBG("sending composed body\n");

tmb.t_request(&msg_type, /* Type of the message */
&str_vals[1], /* Request-URI (To) */
&str_vals[1], /* To */
&str_vals[0], /* From */
&hdr_str, /* Optional headers including CRLF */
(n<0)?(RES_ROWS(db_res)[i].values[3].nul?NULL:&str_vals[2]):&body_str, /* Message body */
(ms_outbound_proxy.s)?&ms_outbound_proxy:0,
/* outbound uri */
m_tm_callback, /* Callback function */
(void*)(long)mid, /* Callback parameter */
NULL
);
if (maxmsg_i > 0) {
LM_DBG("Maximum number of dumped messages: %d\n", maxmsg_i);
sent_cnt++;
if (sent_cnt >= maxmsg_i)
break;
}
tmb.t_request(&msg_type, /* Type of the message */
&str_vals[1], /* Request-URI (To) */
&str_vals[1], /* To */
&str_vals[0], /* From */
&hdr_str, /* Optional headers including CRLF */
(n<0)?(RES_ROWS(db_res)[i].values[3].nul?NULL:&str_vals[2]):&body_str, /* Message body */
(ms_outbound_proxy.s)?&ms_outbound_proxy:0, /* outbound uri */
m_tm_callback, /* Callback function */
(void*)(long)mid, /* Callback parameter */
NULL
);
if (maxmsg_i > 0) {
LM_DBG("Maximum number of dumped messages: %d\n", maxmsg_i);
sent_cnt++;
if (sent_cnt >= maxmsg_i)
break;
}
}

done:
Expand Down

0 comments on commit a6e60a9

Please sign in to comment.