Bug 829344 - Part 3: Fix gcc -Wlogical-op warnings in SIP code. r=jesup

This commit is contained in:
Chris Peterson 2013-01-10 15:19:26 -08:00
Родитель a27d2c850b
Коммит 61b4d90206
1 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

@ -12045,11 +12045,12 @@ getPreallocatedSipCallID (line_t dn_line)
CPR_IP_ADDR_INIT(src_addr);
if ((dn_line > MAX_REG_LINES) && (dn_line < 1)){
if ((dn_line > MAX_REG_LINES) || (dn_line < 1)) {
CCSIP_DEBUG_ERROR(SIP_F_PREFIX"dn_line=%d is greater than %d or less than 1",
fname, dn_line, MAX_REG_LINES);
return NULL;
}
/*
* if one is already created, use it.
*/
@ -12174,7 +12175,7 @@ ccsip_find_preallocated_sip_call_id (line_t dn_line)
{
static const char *fname = "ccsip_find_preallocated_sip_call_id";
if ((dn_line > MAX_REG_LINES) && (dn_line < 1)) {
if ((dn_line > MAX_REG_LINES) || (dn_line < 1)) {
CCSIP_DEBUG_ERROR(SIP_F_PREFIX"dn_line=%d is greater than %d or less than 1\n",
fname, dn_line, MAX_REG_LINES);
return NULL;
@ -12197,7 +12198,7 @@ ccsip_free_preallocated_sip_call_id (line_t dn_line)
{
static const char *fname = "ccsip_free_preallocated_sip_call_id";
if ((dn_line > MAX_REG_LINES) && (dn_line < 1)) {
if ((dn_line > MAX_REG_LINES) || (dn_line < 1)) {
CCSIP_DEBUG_ERROR(SIP_F_PREFIX"dn_line=%d is greater than %d or less than 1\n",
fname, dn_line, MAX_REG_LINES);
return;