[mISDNuser PATCH 3/3] No need to check unsigned variable for less than zero

Thomas Jarosch <[email protected]>
Newsgroups gmane.linux.isdn.i4l.user
Organization Intra2net AG
Message-ID <[email protected]>
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 <[email protected]>
---
 lib/layer3/q931.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/layer3/q931.c b/lib/layer3/q931.c
index 632865a..1b73dba 100644
--- a/lib/layer3/q931.c
+++ b/lib/layer3/q931.c
@@ -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;
-- 
1.7.4.4

_______________________________________________
isdn4linux mailing list
[email protected]
https://www.isdn4linux.de/mailman/listinfo/isdn4linux
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.