summaryrefslogtreecommitdiff
path: root/lib/ip.c
diff options
context:
space:
mode:
authorPavel TvrdĂ­k <pawel.tvrdik@gmail.cz>2015-01-07 15:04:02 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2015-02-21 20:11:02 +0100
commit6264aad16f3320eceb20825c6049917e771b9364 (patch)
treec4cef7df4ccff22d5342e4ae2e87c07410d24ad4 /lib/ip.c
parent85a3639d99a39a79b65c2dbc2a136baee6ba2a2b (diff)
Minor fixes
Diffstat (limited to 'lib/ip.c')
-rw-r--r--lib/ip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ip.c b/lib/ip.c
index 01edf0d5..e1bfba49 100644
--- a/lib/ip.c
+++ b/lib/ip.c
@@ -246,7 +246,7 @@ ip4_pton(char *a, ip4_addr *o)
if (!c != !i)
return 0;
l = strtoul(a, &d, 10);
- if (d != c && *d || l > 255)
+ if (((d != c) && *d) || (l > 255))
return 0;
ia = (ia << 8) | l;
if (c)