summaryrefslogtreecommitdiff
path: root/src/inet.c
diff options
context:
space:
mode:
authorNiraj Kumar Goit <niraj.g@samsung.com>2018-12-12 08:48:34 (GMT)
committerNiraj Kumar Goit <niraj.g@samsung.com>2018-12-17 10:15:15 (GMT)
commit23254e50b44663a69d3431ff3d1840e3f586e86b (patch)
tree530b484c5669dca5d2fbb2e491f93d8949d0cefe /src/inet.c
parentbf7dbf8354f076ec768ae24e61d6fb1e46c623af (diff)
downloadconnman-23254e50b44663a69d3431ff3d1840e3f586e86b.zip
connman-23254e50b44663a69d3431ff3d1840e3f586e86b.tar.gz
connman-23254e50b44663a69d3431ff3d1840e3f586e86b.tar.bz2
[Upstream] Fix return value in error path.refs/changes/02/195702/2
Returning -1 in a function with bool as return value is the same as returning true. Change to false to indicate error if inet_aton() fails. Change-Id: I3dea40bc2506b1a2a0a65e7e838691fc3af957bd Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
Diffstat (limited to 'src/inet.c')
-rw-r--r--src/inet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/inet.c b/src/inet.c
index 25e5372..d54760d 100644
--- a/src/inet.c
+++ b/src/inet.c
@@ -1108,7 +1108,7 @@ bool connman_inet_compare_subnet(int index, const char *host)
return false;
if (inet_aton(host, &_host_addr) == 0)
- return -1;
+ return false;
host_addr = _host_addr.s_addr;
sk = socket(PF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0);