modules/[rls|presence_xml]: fixes warning [-Wtautological-compare] 222/head
authorMikko Lehto <mslehto@iki.fi>
Wed, 24 Jun 2015 20:59:49 +0000 (23:59 +0300)
committerMikko Lehto <mslehto@iki.fi>
Wed, 24 Jun 2015 20:59:49 +0000 (23:59 +0300)
warning: comparison of unsigned expression < 0 is always false

modules/presence_xml/presence_xml.c
modules/rls/rls.c

index 29bf3ec..f8781ef 100644 (file)
@@ -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;
index c87e91e..d77c74c 100644 (file)
@@ -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;