Merge pull request #222 from mslehto/tautological-compare
authorDaniel-Constantin Mierla <miconda@gmail.com>
Thu, 25 Jun 2015 09:58:20 +0000 (11:58 +0200)
committerDaniel-Constantin Mierla <miconda@gmail.com>
Thu, 25 Jun 2015 09:58:20 +0000 (11:58 +0200)
modules/[rls|presence_xml]: fixes warning [-Wtautological-compare]

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 23c6a7c..26d9be0 100644 (file)
@@ -333,7 +333,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;