From: Johan Hedberg <johan.hedberg@gmail.com>
To: Szymon Janc <szymon.janc@codecoup.pl>
Cc: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@codecoup.pl>,
linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH BlueZ 2/3] tools/btpclient: Add connect, disconnect commands
Date: Wed, 10 Jan 2018 13:24:56 +0200 [thread overview]
Message-ID: <20180110112456.GA25998@x1c.lan> (raw)
In-Reply-To: <2527986.brPqJesFBN@ix>
Hi,
On Wed, Jan 10, 2018, Szymon Janc wrote:
> On Tuesday, 9 January 2018 16:45:20 CET Grzegorz Kolodziejczyk wrote:
> > +static bool addr2str(const uint8_t *addr, char *str)
> > +{
> > + return sprintf(str, "%02hhX:%02hhX:%02hhX:%02hhX:%02hhX:%02hhX",
> > + addr[0], addr[1], addr[2], addr[3], addr[4], addr[5])
> > + == 17;
> > +}
>
> Use snprintf.
Why isn't this tool using the address conversion helpers from
lib/bluetooth.c?
Johan
next prev parent reply other threads:[~2018-01-10 11:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-09 15:45 [PATCH BlueZ 1/3] tools/btpclient: Add start, stop advertising commands Grzegorz Kolodziejczyk
2018-01-09 15:45 ` [PATCH BlueZ 2/3] tools/btpclient: Add connect, disconnect commands Grzegorz Kolodziejczyk
2018-01-10 10:57 ` Szymon Janc
2018-01-10 11:24 ` Johan Hedberg [this message]
2018-01-10 12:11 ` Szymon Janc
2018-01-10 12:25 ` Johan Hedberg
2018-01-10 13:14 ` Szymon Janc
2018-01-09 15:45 ` [PATCH BlueZ 3/3] tools/btpclient: Add connected, disconnected event Grzegorz Kolodziejczyk
2018-01-10 10:47 ` [PATCH BlueZ 1/3] tools/btpclient: Add start, stop advertising commands Szymon Janc
2018-01-10 11:36 ` Grzegorz Kołodziejczyk
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=20180110112456.GA25998@x1c.lan \
--to=johan.hedberg@gmail.com \
--cc=grzegorz.kolodziejczyk@codecoup.pl \
--cc=linux-bluetooth@vger.kernel.org \
--cc=szymon.janc@codecoup.pl \
/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;
as well as URLs for NNTP newsgroup(s).