aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--channels/chan_iax2.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index 4d53ca3ab..7d4ff1fd7 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -1492,7 +1492,7 @@ static int __find_callno(unsigned short callno, unsigned short dcallno, struct s
char host[80];
if (new <= NEW_ALLOW) {
- for (x=1;(res < 1) && (x<maxnontrunkcall);x++) {
+ for (x = 1; !res && x < maxnontrunkcall; x++) {
ast_mutex_lock(&iaxsl[x]);
if (iaxs[x]) {
/* Look for an exact match */
@@ -1500,10 +1500,10 @@ static int __find_callno(unsigned short callno, unsigned short dcallno, struct s
res = x;
}
}
- if (!res || (res && !return_locked))
+ if (!res || !return_locked)
ast_mutex_unlock(&iaxsl[x]);
}
- for (x=TRUNK_CALL_START;(res < 1) && (x<maxtrunkcall);x++) {
+ for (x = TRUNK_CALL_START; !res && x < maxtrunkcall; x++) {
ast_mutex_lock(&iaxsl[x]);
if (iaxs[x]) {
/* Look for an exact match */
@@ -1511,11 +1511,11 @@ static int __find_callno(unsigned short callno, unsigned short dcallno, struct s
res = x;
}
}
- if (!res || (res && !return_locked))
+ if (!res || !return_locked)
ast_mutex_unlock(&iaxsl[x]);
}
}
- if ((res < 1) && (new >= NEW_ALLOW)) {
+ if (!res && (new >= NEW_ALLOW)) {
int start, found = 0;
/* It may seem odd that we look through the peer list for a name for