* [PATCH] btio: Fix error number
@ 2020-04-23 23:34 Pali Rohár
2020-04-24 17:24 ` Luiz Augusto von Dentz
0 siblings, 1 reply; 2+ messages in thread
From: Pali Rohár @ 2020-04-23 23:34 UTC (permalink / raw)
To: linux-bluetooth
In commit d20ee8273e61e16c78582344f274254973cdf00f was unintentionally
negated error number. Fix this mistake.
---
btio/btio.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/btio/btio.c b/btio/btio.c
index 460aaf5be..13c731062 100644
--- a/btio/btio.c
+++ b/btio/btio.c
@@ -230,7 +230,7 @@ static gboolean connect_cb(GIOChannel *io, GIOCondition cond,
if (err < 0) {
ba2str(&conn->dst, addr);
- g_set_error(&gerr, BT_IO_ERROR, err,
+ g_set_error(&gerr, BT_IO_ERROR, -err,
"connect to %s: %s (%d)", addr, strerror(-err), -err);
}
@@ -1718,7 +1718,7 @@ GIOChannel *bt_io_connect(BtIOConnect connect, gpointer user_data,
if (err < 0) {
ba2str(&opts.dst, addr);
- g_set_error(gerr, BT_IO_ERROR, err,
+ g_set_error(gerr, BT_IO_ERROR, -err,
"connect to %s: %s (%d)", addr, strerror(-err),
-err);
g_io_channel_unref(io);
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] btio: Fix error number
2020-04-23 23:34 [PATCH] btio: Fix error number Pali Rohár
@ 2020-04-24 17:24 ` Luiz Augusto von Dentz
0 siblings, 0 replies; 2+ messages in thread
From: Luiz Augusto von Dentz @ 2020-04-24 17:24 UTC (permalink / raw)
To: Pali Rohár; +Cc: linux-bluetooth@vger.kernel.org
Hi Pali,
On Thu, Apr 23, 2020 at 4:36 PM Pali Rohár <pali@kernel.org> wrote:
>
> In commit d20ee8273e61e16c78582344f274254973cdf00f was unintentionally
> negated error number. Fix this mistake.
> ---
> btio/btio.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/btio/btio.c b/btio/btio.c
> index 460aaf5be..13c731062 100644
> --- a/btio/btio.c
> +++ b/btio/btio.c
> @@ -230,7 +230,7 @@ static gboolean connect_cb(GIOChannel *io, GIOCondition cond,
>
> if (err < 0) {
> ba2str(&conn->dst, addr);
> - g_set_error(&gerr, BT_IO_ERROR, err,
> + g_set_error(&gerr, BT_IO_ERROR, -err,
> "connect to %s: %s (%d)", addr, strerror(-err), -err);
> }
>
> @@ -1718,7 +1718,7 @@ GIOChannel *bt_io_connect(BtIOConnect connect, gpointer user_data,
>
> if (err < 0) {
> ba2str(&opts.dst, addr);
> - g_set_error(gerr, BT_IO_ERROR, err,
> + g_set_error(gerr, BT_IO_ERROR, -err,
> "connect to %s: %s (%d)", addr, strerror(-err),
> -err);
> g_io_channel_unref(io);
> --
> 2.20.1
Applied, thanks.
--
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-04-24 17:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-23 23:34 [PATCH] btio: Fix error number Pali Rohár
2020-04-24 17:24 ` Luiz Augusto von Dentz
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.