Send connman mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.01.org/mailman/listinfo/connman
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of connman digest..."
Today's Topics:
1. [PATCH] inet: Fix return value in error path (Rikard Falkeborn)
2. Re: [PATCH] inet: Fix return value in error path (Daniel Wagner)
----------------------------------------------------------------------
Message: 1
Date: Thu, 6 Dec 2018 21:40:41 +0100
From: Rikard Falkeborn <[email protected]>
To: [email protected]
Subject: [PATCH] inet: Fix return value in error path
Message-ID: <[email protected]>
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.
---
I tried sending this a few weeks ago but it didn't seem to reach the
mailing list, perhaps because I wasn't subscribed?
src/inet.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/inet.c b/src/inet.c
index 0d3f0d21..28cdb961 100644
--- a/src/inet.c
+++ b/src/inet.c
@@ -1080,7 +1080,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);
--
2.19.1
------------------------------
Message: 2
Date: Fri, 7 Dec 2018 10:51:57 +0100
From: Daniel Wagner <[email protected]>
To: Rikard Falkeborn <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH] inet: Fix return value in error path
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8; format=flowed
Hi Rikard,
On 12/6/18 9:40 PM, Rikard Falkeborn wrote:
> 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.
Patch applied.
> ---
> I tried sending this a few weeks ago but it didn't seem to reach the
> mailing list, perhaps because I wasn't subscribed?
Not sure what the settings are on the mailing list. So I am not
maintaining it and therefore I wont get any notification on mails hold
back for inspection. But yes, that could the reason.
Thanks,
Daniel
------------------------------
Subject: Digest Footer
_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman
------------------------------
End of connman Digest, Vol 38, Issue 1
**************************************