[sr-dev] git:master:d5339cf3: modules/[rls|presence_xml]: fixes warning [-Wtautological-compare]

Mikko Lehto mslehto at iki.fi
Thu Jun 25 11:58:25 CEST 2015


Module: kamailio
Branch: master
Commit: d5339cf397b83b79cd1594e37df69990374ec467
URL: https://github.com/kamailio/kamailio/commit/d5339cf397b83b79cd1594e37df69990374ec467

Author: Mikko Lehto <mslehto at iki.fi>
Committer: Mikko Lehto <mslehto at iki.fi>
Date: 2015-06-24T23:59:49+03:00

modules/[rls|presence_xml]: fixes warning [-Wtautological-compare]

warning: comparison of unsigned expression < 0 is always false

---

Modified: modules/presence_xml/presence_xml.c
Modified: modules/rls/rls.c

---

Diff:  https://github.com/kamailio/kamailio/commit/d5339cf397b83b79cd1594e37df69990374ec467.diff
Patch: https://github.com/kamailio/kamailio/commit/d5339cf397b83b79cd1594e37df69990374ec467.patch

---

diff --git a/modules/presence_xml/presence_xml.c b/modules/presence_xml/presence_xml.c
index 29bf3ec..f8781ef 100644
--- a/modules/presence_xml/presence_xml.c
+++ b/modules/presence_xml/presence_xml.c
@@ -382,7 +382,7 @@ static int pxml_add_xcap_server( modparam_t type, void* val)
 			LM_ERR("while converting string to int\n");
 			goto error;
 		}
-		if(port< 0 || port> 65535)
+		if(port< 1 || port> 65535)
 		{
 			LM_ERR("wrong port number\n");
 			goto error;
diff --git a/modules/rls/rls.c b/modules/rls/rls.c
index c87e91e..d77c74c 100644
--- a/modules/rls/rls.c
+++ b/modules/rls/rls.c
@@ -338,7 +338,7 @@ static int mod_init(void)
 					port_str.len, port_str.s);
 				return -1;
 			}
-			if(xcap_port< 0 || xcap_port> 65535)
+			if(xcap_port< 1 || xcap_port> 65535)
 			{
 				LM_ERR("wrong xcap server port\n");
 				return -1;




More information about the sr-dev mailing list