linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Antonio Ospite <ospite@studenti.unina.it>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH BlueZ] Fix batostr(): return the bdaddr in the right order
Date: Mon, 19 Sep 2011 13:14:09 +0200	[thread overview]
Message-ID: <1316430850.1937.57.camel@aeonflux> (raw)
In-Reply-To: <20110919130200.93d5e77df3bae3f35949c34c@studenti.unina.it>

Hi Antonio,

> > > > lib/bluetooth.c::batostr() is returning the bdaddr reversed, fix this
> > > > and put more arguments on the same line to look more like ba2str().
> > > 
> > > this would be breaking existing API. So NAK.
> > > 
> > 
> > OK, but it is still weird that batostr() and ba2str() work differently.
> > batostr() has no in-tree user AFAICS, just FYI.
> > 
> 
> Would a batostr_bis() which behaves more like ba2str() wrt. bdaddr
> ordering be accepted, or do I just duplicate the code in my function?

just simply use ba2str. With batostr you have potential side effects
with the lifetime of the return memory anyway. That is also the reason
why none of the official BlueZ utilities or the daemon uses it.

Regards

Marcel



      reply	other threads:[~2011-09-19 11:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-14 15:46 [PATCH BlueZ] Fix batostr(): return the bdaddr in the right order Antonio Ospite
2011-09-14 17:53 ` Marcel Holtmann
2011-09-14 19:08   ` Antonio Ospite
2011-09-19 11:02     ` Antonio Ospite
2011-09-19 11:14       ` Marcel Holtmann [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=1316430850.1937.57.camel@aeonflux \
    --to=marcel@holtmann.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=ospite@studenti.unina.it \
    /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).