diff options
author | Niraj Kumar Goit <niraj.g@samsung.com> | 2018-12-12 14:18:34 +0530 |
---|---|---|
committer | Niraj Kumar Goit <niraj.g@samsung.com> | 2018-12-17 10:15:15 +0000 |
commit | 23254e50b44663a69d3431ff3d1840e3f586e86b (patch) | |
tree | 530b484c5669dca5d2fbb2e491f93d8949d0cefe | |
parent | bf7dbf8354f076ec768ae24e61d6fb1e46c623af (diff) | |
download | connman-23254e50b44663a69d3431ff3d1840e3f586e86b.tar.gz connman-23254e50b44663a69d3431ff3d1840e3f586e86b.tar.bz2 connman-23254e50b44663a69d3431ff3d1840e3f586e86b.zip |
[Upstream] Fix return value in error path.
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>
-rw-r--r-- | src/inet.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |