Module: sip-router
Branch: 4.0
Commit: e9ef639beb37e1379a2a62bfaac13a4b64ba7d75
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e9ef639…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Fri Dec 6 19:03:08 2013 +0100
tls: removed unsigned int comparison with <0
(cherry picked from commit 7d6dc390bac2b49615444bcbad74cd39f3c82302)
---
modules/tls/tls_config.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/tls/tls_config.c b/modules/tls/tls_config.c
index 0083893..caf8a60 100644
--- a/modules/tls/tls_config.c
+++ b/modules/tls/tls_config.c
@@ -91,7 +91,7 @@ static int parse_ipv4(struct ip_addr* ip, cfg_token_t* token,
ip->len = 4;
if (str2int(&token->val, &v) < 0) goto err;
- if (v < 0 || v > 255) goto err;
+ if (v > 255) goto err;
ip->u.addr[0] = v;
@@ -104,7 +104,7 @@ static int parse_ipv4(struct ip_addr* ip, cfg_token_t* token,
if (ret < 0) return -1;
if (ret > 0 || t.type != CFG_TOKEN_ALPHA) goto err;
if (str2int(&t.val, &v) < 0) goto err;
- if (v < 0 || v > 255) goto err;
+ if (v > 255) goto err;
ip->u.addr[i] = v;
}