Linux bluetooth development
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Fredrik Noring <noring@nocrew.org>
Cc: BlueZ Mailing List <bluez-devel@lists.sourceforge.net>
Subject: Re: [Bluez-devel] [PATCH] New keytab storage
Date: Sat, 31 Jan 2004 02:18:43 +0100	[thread overview]
Message-ID: <1075511922.3594.49.camel@pegasus> (raw)
In-Reply-To: <1075510549.14644.135.camel@akka.yeti.nocrew.org>

Hi Fredrik,

> Can I ask where the new code is?

I started already coding the new device manager, but accidentally I
deleted that code from my harddisk.

However you should talk a look at libs2 and utils2 from CVS.

> I'd be happy to skip them. The original source (bluez-utils-2.4.tar.gz)
> contains these files for some reason though.

Generate the diffs againt the CVS sources.

> The main reason for this typedef is that the original code did things
> like this:
> 
>     unint8_t link_key_t[16];
>     ...
>     memcpy(key0, key1, 16);
> 
> which, I think, is a lot worse than:
> 
>     memcpy(key0, key1, sizeof(link_key_t));
> 
> Don't you agree? (An alternative is to use #define LINK_KEY_SIZE 16
> instead of course.)

I am not sure how to handle this link key issue in general, but that was
not the argument. See below.

> > than the *_t version must match the structure and not define something 
> > complete different.
> 
> What do you mean?

If you typedef something and it ends with "_t" you should avoid to have
a struct with the same prefix, but different meaning. This example is
ok, but it is not good coding style (typedefs are ugly).

	struct abc {
		int a;
		int b;
		int c;
	};

	typedef struct abc abc_t;

Hope you get my point.

Regards

Marcel




-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

  reply	other threads:[~2004-01-31  1:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-30 23:56 [Bluez-devel] [PATCH] New keytab storage Fredrik Noring
2004-01-31  0:32 ` Marcel Holtmann
2004-01-31  0:55   ` Fredrik Noring
2004-01-31  1:18     ` Marcel Holtmann [this message]
2004-01-31  9:27       ` Fredrik Noring
2004-01-31 15:23         ` Marcel Holtmann
2004-01-31 15:40           ` Fredrik Noring
2004-01-31 15:52             ` Marcel Holtmann
2004-01-31 16:03               ` Fredrik Noring
2004-01-31 18:01                 ` Marcel Holtmann
2004-01-31 18:15                   ` Fredrik Noring
2004-01-31 10:47   ` Fredrik Noring

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=1075511922.3594.49.camel@pegasus \
    --to=marcel@holtmann.org \
    --cc=bluez-devel@lists.sourceforge.net \
    --cc=noring@nocrew.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