No need to check unsigned variable for less than zero

cppcheck reported:
[lib/layer3/q931.c:429]: (style) Checking if unsigned variable 'screen' is less than zero.
[lib/layer3/q931.c:455]: (style) Checking if unsigned variable 'screen' is less than zero.

Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
Signed-off-by: Karsten Keil <kkeil@linux-pingi.de>
This commit is contained in:
Thomas Jarosch 2012-03-30 11:16:18 +02:00 committed by Karsten Keil
parent 0028a07500
commit dfa4b851ef
1 changed files with 2 additions and 2 deletions

View File

@ -426,7 +426,7 @@ mi_encode_calling_nr(struct l3_msg *l3m, char *nr, int pres, unsigned int screen
unsigned char ie[32];
int l;
if (pres < 0 && screen < 0 && (nr == NULL || *nr == 0)) /* defaults, no number provided */
if (pres < 0 && (nr == NULL || *nr == 0)) /* defaults, no number provided */
return 0;
if (nr && strlen(nr) > 30)
return -EINVAL;
@ -452,7 +452,7 @@ mi_encode_connected_nr(struct l3_msg *l3m, char *nr, int pres, unsigned int scre
unsigned char ie[32];
int l;
if (pres < 0 && screen < 0 && (nr == NULL || *nr == 0)) /* defaults, no number provided */
if (pres < 0 && (nr == NULL || *nr == 0)) /* defaults, no number provided */
return 0;
if (nr && strlen(nr) > 30)
return -EINVAL;