From: Szymon Janc <szymon.janc@tieto.com>
To: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 1/6] profiles/network: Minor style fix
Date: Thu, 26 Feb 2015 10:32:50 +0100 [thread overview]
Message-ID: <12182616.g15YdARg1m@uw000953> (raw)
In-Reply-To: <1424355399-10015-1-git-send-email-grzegorz.kolodziejczyk@tieto.com>
Hi Grzegorz,
On Thursday 19 of February 2015 15:16:34 Grzegorz Kolodziejczyk wrote:
> This patch fixes style issues e.g. line aligns, braces.
> ---
> profiles/network/bnep.c | 10 ++++++----
> profiles/network/server.c | 11 +++++------
> 2 files changed, 11 insertions(+), 10 deletions(-)
>
> diff --git a/profiles/network/bnep.c b/profiles/network/bnep.c
> index 09d4b65..70d2e56 100644
> --- a/profiles/network/bnep.c
> +++ b/profiles/network/bnep.c
> @@ -506,10 +506,11 @@ static int bnep_add_to_bridge(const char *devname, const char *bridge)
>
> if (ioctl(sk, SIOCBRADDIF, &ifr) < 0) {
> err = -errno;
> - error("bnep: Can't add %s to the bridge %s: %s(%d)",
> - devname, bridge, strerror(-err), -err);
> - } else
> + error("bnep: Can't add %s to the bridge %s: %s(%d)", devname,
> + bridge, strerror(-err), -err);
I find original code more readable(ie if all parameters fit in single line).
> + } else {
> info("bridge %s: interface %s added", bridge, devname);
> + }
>
> close(sk);
>
> @@ -539,8 +540,9 @@ static int bnep_del_from_bridge(const char *devname, const char *bridge)
> err = -errno;
> error("bnep: Can't delete %s from the bridge %s: %s(%d)",
> devname, bridge, strerror(-err), -err);
> - } else
> + } else {
> info("bridge %s: interface %s removed", bridge, devname);
> + }
>
> close(sk);
>
> diff --git a/profiles/network/server.c b/profiles/network/server.c
> index 3fb031f..ebbe056 100644
> --- a/profiles/network/server.c
> +++ b/profiles/network/server.c
> @@ -650,8 +650,7 @@ static struct network_adapter *create_adapter(struct btd_adapter *adapter)
> na = g_new0(struct network_adapter, 1);
> na->adapter = btd_adapter_ref(adapter);
>
> - na->io = bt_io_listen(NULL, confirm_event, na,
> - NULL, &err,
> + na->io = bt_io_listen(NULL, confirm_event, na, NULL, &err,
> BT_IO_OPT_SOURCE_BDADDR,
> btd_adapter_get_address(adapter),
> BT_IO_OPT_PSM, BNEP_PSM,
> @@ -697,10 +696,10 @@ int server_register(struct btd_adapter *adapter, uint16_t id)
> if (g_slist_length(na->servers) > 0)
> goto done;
>
> - if (!g_dbus_register_interface(btd_get_dbus_connection(),
> - path, NETWORK_SERVER_INTERFACE,
> - server_methods, NULL, NULL,
> - na, path_unregister)) {
> + if (!g_dbus_register_interface(btd_get_dbus_connection(), path,
> + NETWORK_SERVER_INTERFACE,
> + server_methods, NULL, NULL, na,
> + path_unregister)) {
> error("D-Bus failed to register %s interface",
> NETWORK_SERVER_INTERFACE);
> server_free(ns);
>
--
Best regards,
Szymon Janc
prev parent reply other threads:[~2015-02-26 9:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-19 14:16 [PATCH 1/6] profiles/network: Minor style fix Grzegorz Kolodziejczyk
2015-02-19 14:16 ` [PATCH 2/6] android/pan: Return correct error value Grzegorz Kolodziejczyk
2015-02-26 9:31 ` Szymon Janc
2015-02-19 14:16 ` [PATCH 3/6] profiles/network: Use send ctrl rsp to unknown BNEP ctrl cmd Grzegorz Kolodziejczyk
2015-02-26 9:37 ` Szymon Janc
2015-02-26 9:39 ` Grzegorz Kolodziejczyk
2015-02-19 14:16 ` [PATCH 4/6] profiles/network: Integrate get and check bnep setup services roles Grzegorz Kolodziejczyk
2015-02-19 14:16 ` [PATCH 5/6] profiles/network: Move bnep connection setup logic to bnep Grzegorz Kolodziejczyk
2015-02-19 14:16 ` [PATCH 6/6] profiles/network: Handle ctrl rsp after conn setup by bnep Grzegorz Kolodziejczyk
2015-02-26 9:32 ` Szymon Janc [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=12182616.g15YdARg1m@uw000953 \
--to=szymon.janc@tieto.com \
--cc=grzegorz.kolodziejczyk@tieto.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox