Return-Path: From: Szymon Janc To: Johan Hedberg Cc: Grzegorz Kolodziejczyk , linux-bluetooth@vger.kernel.org Subject: Re: [PATCH BlueZ 2/3] tools/btpclient: Add connect, disconnect commands Date: Wed, 10 Jan 2018 13:11:57 +0100 Message-ID: <2315889.ORn3k3E786@ix> In-Reply-To: <20180110112456.GA25998@x1c.lan> References: <20180109154521.30947-1-grzegorz.kolodziejczyk@codecoup.pl> <2527986.brPqJesFBN@ix> <20180110112456.GA25998@x1c.lan> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: linux-bluetooth-owner@vger.kernel.org List-ID: Hi Johan, On Wednesday, 10 January 2018 12:24:56 CET Johan Hedberg wrote: > 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? This is BTP address and has different byte order. -- pozdrawiam Szymon Janc