mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-10 20:08:16 +00:00
Just some minor coding style cleanup...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103318 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -533,7 +533,7 @@ int ast_register_indication(struct ind_tone_zone *zone, const char *indication,
|
|||||||
|
|
||||||
AST_RWLIST_WRLOCK(&tone_zones);
|
AST_RWLIST_WRLOCK(&tone_zones);
|
||||||
for (ps=NULL,ts=zone->tones; ts; ps=ts,ts=ts->next) {
|
for (ps=NULL,ts=zone->tones; ts; ps=ts,ts=ts->next) {
|
||||||
if (strcasecmp(indication,ts->name)==0) {
|
if (!strcasecmp(indication,ts->name)) {
|
||||||
/* indication already there, replace */
|
/* indication already there, replace */
|
||||||
ast_free((void*)ts->name);
|
ast_free((void*)ts->name);
|
||||||
ast_free((void*)ts->data);
|
ast_free((void*)ts->data);
|
||||||
@@ -573,7 +573,7 @@ int ast_unregister_indication(struct ind_tone_zone *zone, const char *indication
|
|||||||
AST_RWLIST_WRLOCK(&tone_zones);
|
AST_RWLIST_WRLOCK(&tone_zones);
|
||||||
ts = zone->tones;
|
ts = zone->tones;
|
||||||
while (ts) {
|
while (ts) {
|
||||||
if (strcasecmp(indication,ts->name)==0) {
|
if (!strcasecmp(indication,ts->name)) {
|
||||||
/* indication found */
|
/* indication found */
|
||||||
tmp = ts->next;
|
tmp = ts->next;
|
||||||
if (ps)
|
if (ps)
|
||||||
|
|||||||
18
main/pbx.c
18
main/pbx.c
@@ -1127,7 +1127,7 @@ static struct match_char *add_pattern_node(struct ast_context *con, struct match
|
|||||||
|
|
||||||
static struct match_char *add_exten_to_pattern_tree(struct ast_context *con, struct ast_exten *e1, int findonly)
|
static struct match_char *add_exten_to_pattern_tree(struct ast_context *con, struct ast_exten *e1, int findonly)
|
||||||
{
|
{
|
||||||
struct match_char *m1=0,*m2=0;
|
struct match_char *m1 = NULL, *m2 = NULL;
|
||||||
int specif;
|
int specif;
|
||||||
int already;
|
int already;
|
||||||
int pattern = 0;
|
int pattern = 0;
|
||||||
@@ -1453,7 +1453,7 @@ static int _extension_match_core(const char *pattern, const char *data, enum ext
|
|||||||
{
|
{
|
||||||
mode &= E_MATCH_MASK; /* only consider the relevant bits */
|
mode &= E_MATCH_MASK; /* only consider the relevant bits */
|
||||||
|
|
||||||
if ( (mode == E_MATCH) && (pattern[0] == '_') && (strcasecmp(pattern,data)==0) ) /* note: if this test is left out, then _x. will not match _x. !!! */
|
if ( (mode == E_MATCH) && (pattern[0] == '_') && (!strcasecmp(pattern,data)) ) /* note: if this test is left out, then _x. will not match _x. !!! */
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
if (pattern[0] != '_') { /* not a pattern, try exact or partial match */
|
if (pattern[0] != '_') { /* not a pattern, try exact or partial match */
|
||||||
@@ -1628,12 +1628,12 @@ struct ast_exten *pbx_find_extension(struct ast_channel *chan,
|
|||||||
const char *label, const char *callerid, enum ext_match_t action)
|
const char *label, const char *callerid, enum ext_match_t action)
|
||||||
{
|
{
|
||||||
int x, res;
|
int x, res;
|
||||||
struct ast_context *tmp=0;
|
struct ast_context *tmp = NULL;
|
||||||
struct ast_exten *e=0, *eroot=0;
|
struct ast_exten *e = NULL, *eroot = NULL;
|
||||||
struct ast_include *i = 0;
|
struct ast_include *i = NULL;
|
||||||
struct ast_sw *sw = 0;
|
struct ast_sw *sw = NULL;
|
||||||
struct ast_exten pattern = {0};
|
struct ast_exten pattern = {NULL, };
|
||||||
struct scoreboard score = {0};
|
struct scoreboard score = {0, };
|
||||||
|
|
||||||
pattern.label = label;
|
pattern.label = label;
|
||||||
pattern.priority = priority;
|
pattern.priority = priority;
|
||||||
@@ -2034,7 +2034,7 @@ void pbx_retrieve_variable(struct ast_channel *c, const char *var, char **ret, c
|
|||||||
if (places[i] == &globals)
|
if (places[i] == &globals)
|
||||||
ast_rwlock_rdlock(&globalslock);
|
ast_rwlock_rdlock(&globalslock);
|
||||||
AST_LIST_TRAVERSE(places[i], variables, entries) {
|
AST_LIST_TRAVERSE(places[i], variables, entries) {
|
||||||
if (strcasecmp(ast_var_name(variables), var)==0) {
|
if (!strcasecmp(ast_var_name(variables), var)) {
|
||||||
s = ast_var_value(variables);
|
s = ast_var_value(variables);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1542,7 +1542,7 @@ struct ast_frame *ast_rtp_read(struct ast_rtp *rtp)
|
|||||||
|
|
||||||
rtp->lastrxseqno = seqno;
|
rtp->lastrxseqno = seqno;
|
||||||
|
|
||||||
if (rtp->themssrc==0)
|
if (!rtp->themssrc)
|
||||||
rtp->themssrc = ntohl(rtpheader[2]); /* Record their SSRC to put in future RR */
|
rtp->themssrc = ntohl(rtpheader[2]); /* Record their SSRC to put in future RR */
|
||||||
|
|
||||||
if (rtp_debug_test_addr(&sin))
|
if (rtp_debug_test_addr(&sin))
|
||||||
|
|||||||
Reference in New Issue
Block a user